[PATCH 10/19] xfs: verify dquot blocks as they are read from disk
Christoph Hellwig
hch at infradead.org
Thu Oct 11 16:48:05 CDT 2012
On Tue, Oct 09, 2012 at 02:51:01PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner at redhat.com>
>
> Add a dquot buffer verify callback function and pass it into the
> buffer read functions. This checks all the dquots in a buffer, but
> cannot completely verify the dquot ids are correct. Also, errors
> cannot be repaired, so an additional function is added to repair bad
> dquots in the buffer if such an error is detected in a context where
> repair is allowed.
>
> Signed-off-by: Dave Chinner <dchinner at redhat.com>
Looks good,
Reviewed-by: Christoph Hellwig <hch at lst.de>
But after the first half dozen of callback I have a question:
> + if (error) {
> + XFS_CORRUPTION_ERROR("xfs_dquot_read_verify",
> + XFS_ERRLEVEL_LOW, mp, d);
> + xfs_buf_ioerror(bp, EFSCORRUPTED);
> + break;
> + }
> + }
> + bp->b_iodone = NULL;
> + xfs_buf_ioend(bp, 0);
It seems we always call xfs_buf_ioerror on errors, and then always
do a
bp->b_iodone = NULL;
xfs_buf_ioend(bp, 0);
for each callback. What is the reason we can't take these two into the
core buffer cache code?
More information about the xfs
mailing list