summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_dquot_item.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2013-12-13 11:00:43 +1100
committerDave Chinner <david@fromorbit.com>2013-12-13 11:00:43 +1100
commit1234351cba958cd5d4338172ccfc869a687cd736 (patch)
tree4ac537e061808787a266a4d1fcfb0e09d185af2e /fs/xfs/xfs_dquot_item.c
parent3de559fbd04d67473b9be2bd183823c40c4b7557 (diff)
downloadblackbird-op-linux-1234351cba958cd5d4338172ccfc869a687cd736.tar.gz
blackbird-op-linux-1234351cba958cd5d4338172ccfc869a687cd736.zip
xfs: introduce xlog_copy_iovec
Add a helper to abstract out filling the log iovecs in the log item format handlers. This will allow us to change the way we do the log item formatting more easily. The copy in the name is a bit confusing for now as it just assigns a pointer and lets the CIL code perform the copy, but that will change soon. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_dquot_item.c')
-rw-r--r--fs/xfs/xfs_dquot_item.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/fs/xfs/xfs_dquot_item.c b/fs/xfs/xfs_dquot_item.c
index 92e5f62eefc6..ca354a821838 100644
--- a/fs/xfs/xfs_dquot_item.c
+++ b/fs/xfs/xfs_dquot_item.c
@@ -57,20 +57,18 @@ xfs_qm_dquot_logitem_size(
STATIC void
xfs_qm_dquot_logitem_format(
struct xfs_log_item *lip,
- struct xfs_log_iovec *logvec)
+ struct xfs_log_iovec *vecp)
{
struct xfs_dq_logitem *qlip = DQUOT_ITEM(lip);
- logvec->i_addr = &qlip->qli_format;
- logvec->i_len = sizeof(xfs_dq_logformat_t);
- logvec->i_type = XLOG_REG_TYPE_QFORMAT;
- logvec++;
- logvec->i_addr = &qlip->qli_dquot->q_core;
- logvec->i_len = sizeof(xfs_disk_dquot_t);
- logvec->i_type = XLOG_REG_TYPE_DQUOT;
+ xlog_copy_iovec(&vecp, XLOG_REG_TYPE_QFORMAT,
+ &qlip->qli_format,
+ sizeof(struct xfs_dq_logformat));
+ xlog_copy_iovec(&vecp, XLOG_REG_TYPE_DQUOT,
+ &qlip->qli_dquot->q_core,
+ sizeof(struct xfs_disk_dquot));
qlip->qli_format.qlf_size = 2;
-
}
/*
@@ -304,15 +302,16 @@ xfs_qm_qoff_logitem_size(
STATIC void
xfs_qm_qoff_logitem_format(
struct xfs_log_item *lip,
- struct xfs_log_iovec *log_vector)
+ struct xfs_log_iovec *vecp)
{
struct xfs_qoff_logitem *qflip = QOFF_ITEM(lip);
ASSERT(qflip->qql_format.qf_type == XFS_LI_QUOTAOFF);
- log_vector->i_addr = &qflip->qql_format;
- log_vector->i_len = sizeof(xfs_qoff_logitem_t);
- log_vector->i_type = XLOG_REG_TYPE_QUOTAOFF;
+ xlog_copy_iovec(&vecp, XLOG_REG_TYPE_QUOTAOFF,
+ &qflip->qql_format,
+ sizeof(struct xfs_qoff_logitem));
+
qflip->qql_format.qf_size = 1;
}
OpenPOWER on IntegriCloud