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>
This commit is contained in:
@@ -34,6 +34,7 @@ struct xfs_log_iovec;
|
||||
struct xfs_log_item_desc;
|
||||
struct xfs_mount;
|
||||
struct xfs_trans;
|
||||
struct xfs_trans_res;
|
||||
struct xfs_dquot_acct;
|
||||
struct xfs_busy_extent;
|
||||
|
||||
@@ -170,7 +171,7 @@ typedef struct xfs_trans {
|
||||
xfs_trans_t *xfs_trans_alloc(struct xfs_mount *, uint);
|
||||
xfs_trans_t *_xfs_trans_alloc(struct xfs_mount *, uint, xfs_km_flags_t);
|
||||
xfs_trans_t *xfs_trans_dup(xfs_trans_t *);
|
||||
int xfs_trans_reserve(xfs_trans_t *, uint, uint, uint,
|
||||
int xfs_trans_reserve(struct xfs_trans *, struct xfs_trans_res *,
|
||||
uint, uint);
|
||||
void xfs_trans_mod_sb(xfs_trans_t *, uint, int64_t);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user