Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Christoph Hellwig and committed by
Dave Chinner
ce8e9629 2f251293

+9 -17
+9 -16
fs/xfs/xfs_dquot_item.c
··· 61 61 { 62 62 struct xfs_dq_logitem *qlip = DQUOT_ITEM(lip); 63 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 75 xlog_copy_iovec(lv, &vecp, XLOG_REG_TYPE_DQUOT, 71 76 &qlip->qli_dquot->q_core, 72 77 sizeof(struct xfs_disk_dquot)); ··· 261 256 xfs_log_item_init(dqp->q_mount, &lp->qli_item, XFS_LI_DQUOT, 262 257 &xfs_dquot_item_ops); 263 258 lp->qli_dquot = dqp; 264 - lp->qli_format.qlf_type = XFS_LI_DQUOT; 265 - lp->qli_format.qlf_id = be32_to_cpu(dqp->q_core.d_id); 266 - lp->qli_format.qlf_blkno = dqp->q_blkno; 267 - lp->qli_format.qlf_len = 1; 268 - /* 269 - * This is just the offset of this dquot within its buffer 270 - * (which is currently 1 FSB and probably won't change). 271 - * Hence 32 bits for this offset should be just fine. 272 - * Alternatively, we can store (bufoffset / sizeof(xfs_dqblk_t)) 273 - * here, and recompute it at recovery time. 274 - */ 275 - lp->qli_format.qlf_boffset = (__uint32_t)dqp->q_bufoffset; 276 259 } 277 260 278 261 /*------------------ QUOTAOFF LOG ITEMS -------------------*/
-1
fs/xfs/xfs_dquot_item.h
··· 27 27 xfs_log_item_t qli_item; /* common portion */ 28 28 struct xfs_dquot *qli_dquot; /* dquot ptr */ 29 29 xfs_lsn_t qli_flush_lsn; /* lsn at last flush */ 30 - xfs_dq_logformat_t qli_format; /* logged structure */ 31 30 } xfs_dq_logitem_t; 32 31 33 32 typedef struct xfs_qoff_logitem {