]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_repair: fix broken EFSBADCRC/EFSCORRUPTED usage with buffer errors
authorDarrick J. Wong <djwong@alder.djwong.org>
Sun, 23 Aug 2015 23:21:01 +0000 (09:21 +1000)
committerDave Chinner <david@fromorbit.com>
Sun, 23 Aug 2015 23:21:01 +0000 (09:21 +1000)
commit66fc04e09573383fde90e2a35944d251f366c773
tree840df5045a49e78301e71b18d7333dac76164d0b
parent603ab21edca73fa1a47515ead7f09a7d42490b3e
xfs_repair: fix broken EFSBADCRC/EFSCORRUPTED usage with buffer errors

When we encounter CRC or verifier errors, bp->b_error is set to
-EFSBADCRC and -EFSCORRUPTED; note the negative sign.  For whatever
reason, repair and db use the positive versions, and therefore fail to
notice the error, so fix all the broken uses.

Note however that the db and repair turn the negative codes returned
by libxfs into positive codes that can be used with strerror.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
db/attr.c
db/dir2.c
db/io.c
db/io.h
repair/dir2.c
repair/scan.c