xfs_db currently gives indication as to whether a buffer CRC is ok
or not. Currently it does this by checking for EFSCORRUPTED in the
b_error field of the buffer. Now that we have EFSBADCRC to indicate
a bad CRC independently of structure corruption, use that instead to
drive the CRC correct/incorrect indication in the structured output.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
}
/*
- * keep the buffer even if the verifier says it is corrupted.
+ * Keep the buffer even if the verifier says it is corrupted.
* We're a diagnostic tool, after all.
*/
- if (!bp || (bp->b_error && bp->b_error != EFSCORRUPTED))
+ if (!bp || (bp->b_error && bp->b_error != EFSCORRUPTED &&
+ bp->b_error != EFSBADCRC))
return;
iocur_top->buf = bp->b_addr;
iocur_top->bp = bp;
iocur_crc_valid()
{
return (iocur_top->bp &&
- iocur_top->bp->b_error != EFSCORRUPTED &&
+ iocur_top->bp->b_error != EFSBADCRC &&
(!iocur_top->ino_buf || iocur_top->ino_crc_ok));
}