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

xfs: remove the quotaoff log format from the quotaoff log item

This one doesn't save a whole lot of memory, but still makes the
code simpler.

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
ffda4e83 ce8e9629

+8 -16
+7 -15
fs/xfs/xfs_dquot_item.c
··· 286 286 *nbytes += sizeof(struct xfs_qoff_logitem); 287 287 } 288 288 289 - /* 290 - * This is called to fill in the vector of log iovecs for the 291 - * given quotaoff log item. We use only 1 iovec, and we point that 292 - * at the quotaoff_log_format structure embedded in the quotaoff item. 293 - * It is at this point that we assert that all of the extent 294 - * slots in the quotaoff item have been filled. 295 - */ 296 289 STATIC void 297 290 xfs_qm_qoff_logitem_format( 298 291 struct xfs_log_item *lip, ··· 293 300 { 294 301 struct xfs_qoff_logitem *qflip = QOFF_ITEM(lip); 295 302 struct xfs_log_iovec *vecp = NULL; 303 + struct xfs_qoff_logformat *qlf; 296 304 297 - ASSERT(qflip->qql_format.qf_type == XFS_LI_QUOTAOFF); 298 - qflip->qql_format.qf_size = 1; 299 - 300 - xlog_copy_iovec(lv, &vecp, XLOG_REG_TYPE_QUOTAOFF, 301 - &qflip->qql_format, 302 - sizeof(struct xfs_qoff_logitem)); 305 + qlf = xlog_prepare_iovec(lv, &vecp, XLOG_REG_TYPE_QUOTAOFF); 306 + qlf->qf_type = XFS_LI_QUOTAOFF; 307 + qlf->qf_size = 1; 308 + qlf->qf_flags = qflip->qql_flags; 309 + xlog_finish_iovec(lv, vecp, sizeof(struct xfs_qoff_logitem)); 303 310 } 304 311 305 312 /* ··· 439 446 xfs_log_item_init(mp, &qf->qql_item, XFS_LI_QUOTAOFF, start ? 440 447 &xfs_qm_qoffend_logitem_ops : &xfs_qm_qoff_logitem_ops); 441 448 qf->qql_item.li_mountp = mp; 442 - qf->qql_format.qf_type = XFS_LI_QUOTAOFF; 443 - qf->qql_format.qf_flags = flags; 444 449 qf->qql_start_lip = start; 450 + qf->qql_flags = flags; 445 451 return qf; 446 452 }
+1 -1
fs/xfs/xfs_dquot_item.h
··· 32 32 typedef struct xfs_qoff_logitem { 33 33 xfs_log_item_t qql_item; /* common portion */ 34 34 struct xfs_qoff_logitem *qql_start_lip; /* qoff-start logitem, if any */ 35 - xfs_qoff_logformat_t qql_format; /* logged structure */ 35 + unsigned int qql_flags; 36 36 } xfs_qoff_logitem_t; 37 37 38 38