]> www.infradead.org Git - users/hch/xfsprogs.git/commit
xfs_repair: make CRC checking consistent in path verification
authorEric Sandeen <sandeen@sandeen.net>
Tue, 13 Oct 2015 23:29:32 +0000 (10:29 +1100)
committerDave Chinner <david@fromorbit.com>
Tue, 13 Oct 2015 23:29:32 +0000 (10:29 +1100)
commite41dd632f12a2a08499db551e2bc126042e3b986
treedf47b8d155754e5399af5b6216aa90ddbfbe4538
parent54aeafa573e1a472e4522f1ff3522d8e9b9aa0b2
xfs_repair: make CRC checking consistent in path verification

verify_da_path and verify_dir2_path both take steps to
re-compute the CRC of the block if it otherwise looks
ok and no other changes are needed.  They do this inside
a loop, but the approach differs; verify_da_path expects
its caller to check the first buffer prior to the loop,
and verify_dir2_path expects its caller to check the last
buffer after the loop.

Make this consistent by semi-arbitrarily choosing to make
verify_da_path (and its caller) match the method used by
verify_dir2_path, and check the last buffer after the
loop is done.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
repair/attr_repair.c