summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_trans.h
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2013-08-12 20:50:06 +1000
committerBen Myers <bpm@sgi.com>2013-08-13 16:19:03 -0500
commitf5baac354db8b6abfe8ed4ff6b6c3438c42ea606 (patch)
treed4751244552a0c974d9e627209104a2a33e179ca /fs/xfs/xfs_trans.h
parent7492c5b42de857c13d8b7e0dafb2a5e331598e00 (diff)
downloadlinux-f5baac354db8b6abfe8ed4ff6b6c3438c42ea606.tar.gz
linux-f5baac354db8b6abfe8ed4ff6b6c3438c42ea606.tar.bz2
linux-f5baac354db8b6abfe8ed4ff6b6c3438c42ea606.zip
xfs: avoid CIL allocation during insert
Now that we have the size of the log vector that has been allocated, we can determine if we need to allocate a new log vector for formatting and insertion. We only need to allocate a new vector if it won't fit into the existing buffer. However, we need to hold the CIL context lock while we do this so that we can't race with a push draining the currently queued log vectors. It is safe to do this as long as we do GFP_NOFS allocation to avoid avoid memory allocation recursing into the filesystem. Hence we can safely overwrite the existing log vector on the CIL if it is large enough to hold all the dirty regions of the current item. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Mark Tinguely <tinguely@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_trans.h')
-rw-r--r--fs/xfs/xfs_trans.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/xfs/xfs_trans.h b/fs/xfs/xfs_trans.h
index 24bbdcd297c7..4786170baeb0 100644
--- a/fs/xfs/xfs_trans.h
+++ b/fs/xfs/xfs_trans.h
@@ -77,7 +77,6 @@ struct xfs_item_ops {
void (*iop_committing)(xfs_log_item_t *, xfs_lsn_t);
};
-#define IOP_PIN(ip) (*(ip)->li_ops->iop_pin)(ip)
#define IOP_UNPIN(ip, remove) (*(ip)->li_ops->iop_unpin)(ip, remove)
#define IOP_PUSH(ip, list) (*(ip)->li_ops->iop_push)(ip, list)
#define IOP_UNLOCK(ip) (*(ip)->li_ops->iop_unlock)(ip)