diff options
author | Christoph Hellwig <hch@infradead.org> | 2013-12-12 19:34:07 -0500 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2013-12-12 19:34:07 -0500 |
commit | ce8e962939ca12218092f8eb3c8cfb196cd8cc51 (patch) | |
tree | f2b1df10b8af7b8c2eed8902733be9187c8b7cb1 | |
parent | 2f251293b09065118d78ae4e883e5639cc22f94e (diff) |
xfs: remove the dquot log format from the dquot log item
No need to keep the dquot log format around all the time, we can
easily generate it at iop_format time.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
-rw-r--r-- | fs/xfs/xfs_dquot_item.c | 25 | ||||
-rw-r--r-- | fs/xfs/xfs_dquot_item.h | 1 |
2 files changed, 9 insertions, 17 deletions
diff --git a/fs/xfs/xfs_dquot_item.c b/fs/xfs/xfs_dquot_item.c index 946d588070b0..d4fffa90036a 100644 --- a/fs/xfs/xfs_dquot_item.c +++ b/fs/xfs/xfs_dquot_item.c | |||
@@ -61,12 +61,17 @@ xfs_qm_dquot_logitem_format( | |||
61 | { | 61 | { |
62 | struct xfs_dq_logitem *qlip = DQUOT_ITEM(lip); | 62 | struct xfs_dq_logitem *qlip = DQUOT_ITEM(lip); |
63 | struct xfs_log_iovec *vecp = NULL; | 63 | struct xfs_log_iovec *vecp = NULL; |
64 | struct xfs_dq_logformat *qlf; | ||
64 | 65 | ||
65 | qlip->qli_format.qlf_size = 2; | 66 | qlf = xlog_prepare_iovec(lv, &vecp, XLOG_REG_TYPE_QFORMAT); |
67 | qlf->qlf_type = XFS_LI_DQUOT; | ||
68 | qlf->qlf_size = 2; | ||
69 | qlf->qlf_id = be32_to_cpu(qlip->qli_dquot->q_core.d_id); | ||
70 | qlf->qlf_blkno = qlip->qli_dquot->q_blkno; | ||
71 | qlf->qlf_len = 1; | ||
72 | qlf->qlf_boffset = qlip->qli_dquot->q_bufoffset; | ||
73 | xlog_finish_iovec(lv, vecp, sizeof(struct xfs_dq_logformat)); | ||
66 | 74 | ||
67 | xlog_copy_iovec(lv, &vecp, XLOG_REG_TYPE_QFORMAT, | ||
68 | &qlip->qli_format, | ||
69 | sizeof(struct xfs_dq_logformat)); | ||
70 | xlog_copy_iovec(lv, &vecp, XLOG_REG_TYPE_DQUOT, | 75 | xlog_copy_iovec(lv, &vecp, XLOG_REG_TYPE_DQUOT, |
71 | &qlip->qli_dquot->q_core, | 76 | &qlip->qli_dquot->q_core, |
72 | sizeof(struct xfs_disk_dquot)); | 77 | sizeof(struct xfs_disk_dquot)); |
@@ -256,18 +261,6 @@ xfs_qm_dquot_logitem_init( | |||
256 | xfs_log_item_init(dqp->q_mount, &lp->qli_item, XFS_LI_DQUOT, | 261 | xfs_log_item_init(dqp->q_mount, &lp->qli_item, XFS_LI_DQUOT, |
257 | &xfs_dquot_item_ops); | 262 | &xfs_dquot_item_ops); |
258 | lp->qli_dquot = dqp; | 263 | lp->qli_dquot = dqp; |
259 | lp->qli_format.qlf_type = XFS_LI_DQUOT; | ||
260 | lp->qli_format.qlf_id = be32_to_cpu(dqp->q_core.d_id); | ||
261 | lp->qli_format.qlf_blkno = dqp->q_blkno; | ||
262 | lp->qli_format.qlf_len = 1; | ||
263 | /* | ||
264 | * This is just the offset of this dquot within its buffer | ||
265 | * (which is currently 1 FSB and probably won't change). | ||
266 | * Hence 32 bits for this offset should be just fine. | ||
267 | * Alternatively, we can store (bufoffset / sizeof(xfs_dqblk_t)) | ||
268 | * here, and recompute it at recovery time. | ||
269 | */ | ||
270 | lp->qli_format.qlf_boffset = (__uint32_t)dqp->q_bufoffset; | ||
271 | } | 264 | } |
272 | 265 | ||
273 | /*------------------ QUOTAOFF LOG ITEMS -------------------*/ | 266 | /*------------------ QUOTAOFF LOG ITEMS -------------------*/ |
diff --git a/fs/xfs/xfs_dquot_item.h b/fs/xfs/xfs_dquot_item.h index 5acae2ada70b..925cbe948c67 100644 --- a/fs/xfs/xfs_dquot_item.h +++ b/fs/xfs/xfs_dquot_item.h | |||
@@ -27,7 +27,6 @@ typedef struct xfs_dq_logitem { | |||
27 | xfs_log_item_t qli_item; /* common portion */ | 27 | xfs_log_item_t qli_item; /* common portion */ |
28 | struct xfs_dquot *qli_dquot; /* dquot ptr */ | 28 | struct xfs_dquot *qli_dquot; /* dquot ptr */ |
29 | xfs_lsn_t qli_flush_lsn; /* lsn at last flush */ | 29 | xfs_lsn_t qli_flush_lsn; /* lsn at last flush */ |
30 | xfs_dq_logformat_t qli_format; /* logged structure */ | ||
31 | } xfs_dq_logitem_t; | 30 | } xfs_dq_logitem_t; |
32 | 31 | ||
33 | typedef struct xfs_qoff_logitem { | 32 | typedef struct xfs_qoff_logitem { |