diff options
author | Dave Chinner <dchinner@redhat.com> | 2014-11-07 08:31:15 +1100 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2014-11-07 08:31:15 +1100 |
commit | febe3cbe38b0bc0a925906dc90e8d59048851f87 (patch) | |
tree | 34a2cca7bbb1c14f19032eb9cfa693f5a3146b4a /fs/xfs/mrlock.h | |
parent | 6e57c542cb7e0e580eb53ae76a77875c7d92b4b1 (diff) | |
download | linux-febe3cbe38b0bc0a925906dc90e8d59048851f87.tar.bz2 |
xfs: bulkstat error handling is broken
The error propagation is a horror - xfs_bulkstat() returns
a rval variable which is only set if there are formatter errors. Any
sort of btree walk error or corruption will cause the bulkstat walk
to terminate but will not pass an error back to userspace. Worse
is the fact that formatter errors will also be ignored if any inodes
were correctly formatted into the user buffer.
Hence bulkstat can fail badly yet still report success to userspace.
This causes significant issues with xfsdump not dumping everything
in the filesystem yet reporting success. It's not until a restore
fails that there is any indication that the dump was bad and tha
bulkstat failed. This patch now triggers xfsdump to fail with
bulkstat errors rather than silently missing files in the dump.
This now causes bulkstat to fail when the lastino cookie does not
fall inside an existing inode chunk. The pre-3.17 code tolerated
that error by allowing the code to move to the next inode chunk
as the agino target is guaranteed to fall into the next btree
record.
With the fixes up to this point in the series, xfsdump now passes on
the troublesome filesystem image that exposes all these bugs.
cc: <stable@vger.kernel.org>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Diffstat (limited to 'fs/xfs/mrlock.h')
0 files changed, 0 insertions, 0 deletions