Re: [PATCH 10/19] xfs: verify dquot blocks as they are read from disk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 09, 2012 at 02:51:01PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx>

Looks good,

Reviewed-by: Christoph Hellwig <hch@xxxxxx>

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?

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux