summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log.c
diff options
context:
space:
mode:
authorDave Chinner2010-03-23 00:10:00 +0100
committerAlex Elder2010-05-19 16:58:07 +0200
commit43f5efc5b59db1b66e39fe9fdfc4ba6a27152afa (patch)
tree100e2b49e622e6933d8f88e052076e23bd943ae1 /fs/xfs/xfs_log.c
parentxfs: add blockdev name to kthreads (diff)
downloadkernel-qcow2-linux-43f5efc5b59db1b66e39fe9fdfc4ba6a27152afa.tar.gz
kernel-qcow2-linux-43f5efc5b59db1b66e39fe9fdfc4ba6a27152afa.tar.xz
kernel-qcow2-linux-43f5efc5b59db1b66e39fe9fdfc4ba6a27152afa.zip
xfs: factor log item initialisation
Each log item type does manual initialisation of the log item. Delayed logging introduces new fields that need initialisation, so factor all the open coded initialisation into a common function first. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_log.c')
-rw-r--r--fs/xfs/xfs_log.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 2be019136287..8556c59628ba 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -648,6 +648,19 @@ xfs_log_unmount(xfs_mount_t *mp)
xlog_dealloc_log(mp->m_log);
}
+void
+xfs_log_item_init(
+ struct xfs_mount *mp,
+ struct xfs_log_item *item,
+ int type,
+ struct xfs_item_ops *ops)
+{
+ item->li_mountp = mp;
+ item->li_ailp = mp->m_ail;
+ item->li_type = type;
+ item->li_ops = ops;
+}
+
/*
* Write region vectors to log. The write happens using the space reservation
* of the ticket (tic). It is not a requirement that all writes for a given