[PATCH 04/10] xfs_repair: fix broken EFSBADCRC/EFSCORRUPTED usage with buffer errors
Eric Sandeen
sandeen at sandeen.net
Mon Aug 17 14:57:09 CDT 2015
On 8/17/15 2:51 PM, Eric Sandeen wrote:
> On 8/14/15 8:44 PM, Darrick J. Wong wrote:
>> 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 at oracle.com>
>
> This looks right, but I think there's more; see:
>
> XFS_WANT_CORRUPTED_GOTO
> XFS_WANT_CORRUPTED_RETURN
>
> (these return negative errors in kernelspace)
>
> and a bunch of stuff in libxlog/xfs_log_recover.c...
Ok, I guess libxlog/* was never switched to negative, and so far it looks
ok.
The XFS_WANT_CORRUPTED* macros seem like a problem, though.
-Eric
More information about the xfs
mailing list