xfs: verify dquot blocks as they are read from disk
authorDave Chinner <dchinner@redhat.com>
Wed, 14 Nov 2012 06:50:13 +0000 (17:50 +1100)
committerBen Myers <bpm@sgi.com>
Fri, 16 Nov 2012 03:34:33 +0000 (21:34 -0600)
commitc6319198702350a2215a8c0cacd6cc4283728a1b
tree3016229da9ca0c4c6a657c7b587d20ee41a9eaab
parent3d3e6f64e22c94115d47de670611bcd3ecda3796
xfs: verify dquot blocks as they are read from disk

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@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Phil White <pwhite@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
fs/xfs/xfs_dquot.c
fs/xfs/xfs_dquot.h
fs/xfs/xfs_qm.c