summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log_recover.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2013-04-03 07:11:16 +0200
committerBen Myers <bpm@sgi.com>2013-04-21 21:58:22 +0200
commit3fe58f30b4fc3f8a9084b035a02bc0c67bee8d00 (patch)
tree4b46222d26f3e74d65c6741ddcaed7eaa48948eb /fs/xfs/xfs_log_recover.c
parentxfs: add CRC checks to the AGI (diff)
downloadlinux-3fe58f30b4fc3f8a9084b035a02bc0c67bee8d00.tar.xz
linux-3fe58f30b4fc3f8a9084b035a02bc0c67bee8d00.zip
xfs: add CRC checks for quota blocks
Use the reserved space in struct xfs_dqblk to store a UUID and a crc for the quota blocks. [dchinner@redhat.com] Add a LSN field and update for current verifier infrastructure. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Ben Myers <bpm@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_log_recover.c')
-rw-r--r--fs/xfs/xfs_log_recover.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index 6778a7943db4..27b3ec214a67 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -1979,6 +1979,16 @@ xlog_recover_do_reg_buffer(
}
bp->b_ops = &xfs_agi_buf_ops;
break;
+ case XFS_BLF_UDQUOT_BUF:
+ case XFS_BLF_PDQUOT_BUF:
+ case XFS_BLF_GDQUOT_BUF:
+ if (*(__be16 *)bp->b_addr != cpu_to_be16(XFS_DQUOT_MAGIC)) {
+ xfs_warn(mp, "Bad DQUOT block magic!");
+ ASSERT(0);
+ break;
+ }
+ bp->b_ops = &xfs_dquot_buf_ops;
+ break;
default:
break;
}