xfs: bulkstat btree walk doesn't terminate
authorDave Chinner <dchinner@redhat.com>
Thu, 6 Nov 2014 21:29:57 +0000 (08:29 +1100)
committerDave Chinner <david@fromorbit.com>
Thu, 6 Nov 2014 21:29:57 +0000 (08:29 +1100)
commitafa947cb52a8e73fe71915a0b0af6fcf98dfbe1a
treebd4e27a0faac80e48da23c1bbc19a9622ffe35ed
parent77783d06427293b2d711c45cfd4abc6494a1af9c
xfs: bulkstat btree walk doesn't terminate

The bulkstat code has several different ways of detecting the end of
an AG when doing a walk. They are not consistently detected, and the
code that checks for the end of AG conditions is not consistently
coded. Hence the are conditions where the walk code can get stuck in
an endless loop making no progress and not triggering any
termination conditions.

Convert all the "tmp/i" status return codes from btree operations
to a common name (stat) and apply end-of-ag detection to these
operations consistently.

cc: <stable@vger.kernel.org> # 3.17
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_itable.c