xfs
[Top] [All Lists]

[PATCH 4/7] xfs: remove the quotaoff log format from the quotaoff log it

To: xfs@xxxxxxxxxxx
Subject: [PATCH 4/7] xfs: remove the quotaoff log format from the quotaoff log item
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Sat, 23 Nov 2013 07:11:55 -0800
Delivered-to: xfs@xxxxxxxxxxx
References: <20131123151151.716201348@xxxxxxxxxxxxxxxxxxxxxx>
User-agent: quilt/0.60-1
No quite as large as the previous ones, but easy enough to decouple.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
---
 fs/xfs/xfs_dquot_item.c |   16 ++++++++--------
 fs/xfs/xfs_dquot_item.h |    2 +-
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/fs/xfs/xfs_dquot_item.c b/fs/xfs/xfs_dquot_item.c
index 2df55fe..c1917fd 100644
--- a/fs/xfs/xfs_dquot_item.c
+++ b/fs/xfs/xfs_dquot_item.c
@@ -306,16 +306,17 @@ xfs_qm_qoff_logitem_format(
 {
        struct xfs_qoff_logitem *qflip = QOFF_ITEM(lip);
        struct xfs_log_iovec *vec;
-
-       ASSERT(qflip->qql_format.qf_type == XFS_LI_QUOTAOFF);
-
-       qflip->qql_format.qf_size = 1;
+       struct xfs_qoff_logformat *qlf;
 
        vec = xlog_first_iovec(lv);
-       memcpy(vec->i_addr, &qflip->qql_format, sizeof(xfs_qoff_logitem_t));
-       vec->i_len = sizeof(xfs_qoff_logitem_t);
+       vec->i_len = sizeof(struct xfs_qoff_logitem);
        vec->i_type = XLOG_REG_TYPE_QUOTAOFF;
 
+       qlf = vec->i_addr;
+       qlf->qf_type = XFS_LI_QUOTAOFF;
+       qlf->qf_size = 1;
+       qlf->qf_flags = qflip->qql_flags;
+
        xlog_last_iovec(lv, vec);
 }
 
@@ -456,8 +457,7 @@ xfs_qm_qoff_logitem_init(
        xfs_log_item_init(mp, &qf->qql_item, XFS_LI_QUOTAOFF, start ?
                        &xfs_qm_qoffend_logitem_ops : &xfs_qm_qoff_logitem_ops);
        qf->qql_item.li_mountp = mp;
-       qf->qql_format.qf_type = XFS_LI_QUOTAOFF;
-       qf->qql_format.qf_flags = flags;
        qf->qql_start_lip = start;
+       qf->qql_flags = flags;
        return qf;
 }
diff --git a/fs/xfs/xfs_dquot_item.h b/fs/xfs/xfs_dquot_item.h
index 925cbe9..502e946 100644
--- a/fs/xfs/xfs_dquot_item.h
+++ b/fs/xfs/xfs_dquot_item.h
@@ -32,7 +32,7 @@ typedef struct xfs_dq_logitem {
 typedef struct xfs_qoff_logitem {
        xfs_log_item_t           qql_item;      /* common portion */
        struct xfs_qoff_logitem *qql_start_lip; /* qoff-start logitem, if any */
-       xfs_qoff_logformat_t     qql_format;    /* logged structure */
+       unsigned int            qql_flags;
 } xfs_qoff_logitem_t;
 
 
-- 
1.7.10.4


<Prev in Thread] Current Thread [Next in Thread>