diff options
author | Christoph Hellwig <hch@lst.de> | 2013-04-03 01:11:16 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-04-21 15:58:22 -0400 |
commit | 3fe58f30b4fc3f8a9084b035a02bc0c67bee8d00 (patch) | |
tree | 4b46222d26f3e74d65c6741ddcaed7eaa48948eb /fs/xfs/xfs_quota.h | |
parent | 983d09ffe396ed5d5339a1b9ff994dd0b0f2069f (diff) |
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_quota.h')
-rw-r--r-- | fs/xfs/xfs_quota.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/xfs/xfs_quota.h b/fs/xfs/xfs_quota.h index b50ec5b95d5a..c61e31c7d997 100644 --- a/fs/xfs/xfs_quota.h +++ b/fs/xfs/xfs_quota.h | |||
@@ -77,7 +77,14 @@ typedef struct xfs_disk_dquot { | |||
77 | */ | 77 | */ |
78 | typedef struct xfs_dqblk { | 78 | typedef struct xfs_dqblk { |
79 | xfs_disk_dquot_t dd_diskdq; /* portion that lives incore as well */ | 79 | xfs_disk_dquot_t dd_diskdq; /* portion that lives incore as well */ |
80 | char dd_fill[32]; /* filling for posterity */ | 80 | char dd_fill[4]; /* filling for posterity */ |
81 | |||
82 | /* | ||
83 | * These two are only present on filesystems with the CRC bits set. | ||
84 | */ | ||
85 | __be32 dd_crc; /* checksum */ | ||
86 | __be64 dd_lsn; /* last modification in log */ | ||
87 | uuid_t dd_uuid; /* location information */ | ||
81 | } xfs_dqblk_t; | 88 | } xfs_dqblk_t; |
82 | 89 | ||
83 | /* | 90 | /* |
@@ -380,5 +387,7 @@ extern int xfs_qm_dqcheck(struct xfs_mount *, xfs_disk_dquot_t *, | |||
380 | xfs_dqid_t, uint, uint, char *); | 387 | xfs_dqid_t, uint, uint, char *); |
381 | extern int xfs_mount_reset_sbqflags(struct xfs_mount *); | 388 | extern int xfs_mount_reset_sbqflags(struct xfs_mount *); |
382 | 389 | ||
390 | extern const struct xfs_buf_ops xfs_dquot_buf_ops; | ||
391 | |||
383 | #endif /* __KERNEL__ */ | 392 | #endif /* __KERNEL__ */ |
384 | #endif /* __XFS_QUOTA_H__ */ | 393 | #endif /* __XFS_QUOTA_H__ */ |