aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_qm.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2012-11-14 01:50:13 -0500
committerBen Myers <bpm@sgi.com>2012-11-15 22:34:33 -0500
commitc6319198702350a2215a8c0cacd6cc4283728a1b (patch)
tree3016229da9ca0c4c6a657c7b587d20ee41a9eaab /fs/xfs/xfs_qm.c
parent3d3e6f64e22c94115d47de670611bcd3ecda3796 (diff)
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>
Diffstat (limited to 'fs/xfs/xfs_qm.c')
-rw-r--r--fs/xfs/xfs_qm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
index 688f608b3668..a6dfb97490cc 100644
--- a/fs/xfs/xfs_qm.c
+++ b/fs/xfs/xfs_qm.c
@@ -892,7 +892,8 @@ xfs_qm_dqiter_bufs(
892 while (blkcnt--) { 892 while (blkcnt--) {
893 error = xfs_trans_read_buf(mp, NULL, mp->m_ddev_targp, 893 error = xfs_trans_read_buf(mp, NULL, mp->m_ddev_targp,
894 XFS_FSB_TO_DADDR(mp, bno), 894 XFS_FSB_TO_DADDR(mp, bno),
895 mp->m_quotainfo->qi_dqchunklen, 0, &bp, NULL); 895 mp->m_quotainfo->qi_dqchunklen, 0, &bp,
896 xfs_dquot_read_verify);
896 if (error) 897 if (error)
897 break; 898 break;
898 899