summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_trans_resv.h
diff options
context:
space:
mode:
authorJie Liu <jeff.liu@oracle.com>2013-08-12 20:49:59 +1000
committerBen Myers <bpm@sgi.com>2013-08-12 17:47:34 -0500
commit3d3c8b5222b92447bffaa4127ee18c757f32a460 (patch)
tree250f3b61679231944b5272d18d17e6ceabfc62d1 /fs/xfs/xfs_trans_resv.h
parent783cb6d172358892d6af394ebe2876bcbfcc6499 (diff)
xfs: refactor xfs_trans_reserve() interface
With the new xfs_trans_res structure has been introduced, the log reservation size, log count as well as log flags are pre-initialized at mount time. So it's time to refine xfs_trans_reserve() interface to be more neat. Also, introduce a new helper M_RES() to return a pointer to the mp->m_resv structure to simplify the input. Signed-off-by: Jie Liu <jeff.liu@oracle.com> 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_resv.h')
-rw-r--r--fs/xfs/xfs_trans_resv.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/xfs/xfs_trans_resv.h b/fs/xfs/xfs_trans_resv.h
index b8d5666990fe..140d3f367284 100644
--- a/fs/xfs/xfs_trans_resv.h
+++ b/fs/xfs/xfs_trans_resv.h
@@ -65,6 +65,9 @@ struct xfs_trans_resv {
struct xfs_trans_res tr_fsyncts; /* update timestamps on fsync */
};
+/* shorthand way of accessing reservation structure */
+#define M_RES(mp) (&(mp)->m_resv)
+
/*
* Per-extent log reservation for the allocation btree changes
* involved in freeing or allocating an extent.