From: Brian Foster Date: Thu, 4 Oct 2018 19:23:01 +0000 (-0500) Subject: xfs: rename xfs_trans ->t_agfl_dfops to ->t_dfops X-Git-Tag: v4.19.0-rc0~87 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=55fb19bb73f25b472fdb0bdf5547eeea19582f7f;p=thirdparty%2Fxfsprogs-dev.git xfs: rename xfs_trans ->t_agfl_dfops to ->t_dfops Source kernel commit: 6aa6718439ac6907b3c34cbe7ac2c71408f84f6e The ->t_agfl_dfops field is currently used to defer agfl block frees from associated transaction contexts. While all known problematic contexts have already been updated to use ->t_agfl_dfops, the broader goal is defer agfl frees from all callers that already use a deferred operations structure. Further, the transaction field facilitates a good amount of code clean up where the transaction and dfops have historically been passed down through the stack separately. Rename the field to something more generic to prepare to use it as such throughout XFS. This patch does not change behavior. Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Signed-off-by: Eric Sandeen --- diff --git a/include/xfs_trans.h b/include/xfs_trans.h index fffc99bbe..3cabf3d23 100644 --- a/include/xfs_trans.h +++ b/include/xfs_trans.h @@ -73,7 +73,7 @@ typedef struct xfs_trans { long t_fdblocks_delta; /* superblock fdblocks chg */ long t_frextents_delta; /* superblock freextents chg */ struct list_head t_items; /* first log item desc chunk */ - struct xfs_defer_ops *t_agfl_dfops; /* optional agfl fixup dfops */ + struct xfs_defer_ops *t_dfops; /* deferred operations */ } xfs_trans_t; diff --git a/libxfs/trans.c b/libxfs/trans.c index e0567d504..2fef72914 100644 --- a/libxfs/trans.c +++ b/libxfs/trans.c @@ -158,7 +158,7 @@ xfs_trans_dup( ntp->t_blk_res = tp->t_blk_res - tp->t_blk_res_used; tp->t_blk_res = tp->t_blk_res_used; - ntp->t_agfl_dfops = tp->t_agfl_dfops; + ntp->t_dfops = tp->t_dfops; return ntp; } @@ -975,8 +975,8 @@ __xfs_trans_commit( if (tp == NULL) return 0; - ASSERT(!tp->t_agfl_dfops || - !xfs_defer_has_unfinished_work(tp->t_agfl_dfops) || regrant); + ASSERT(!tp->t_dfops || + !xfs_defer_has_unfinished_work(tp->t_dfops) || regrant); if (!(tp->t_flags & XFS_TRANS_DIRTY)) { #ifdef XACT_DEBUG diff --git a/libxfs/xfs_alloc.c b/libxfs/xfs_alloc.c index 5ead56d29..da7c51d39 100644 --- a/libxfs/xfs_alloc.c +++ b/libxfs/xfs_alloc.c @@ -2320,8 +2320,8 @@ xfs_alloc_fix_freelist( goto out_agbp_relse; /* defer agfl frees if dfops is provided */ - if (tp->t_agfl_dfops) { - xfs_defer_agfl_block(mp, tp->t_agfl_dfops, args->agno, + if (tp->t_dfops) { + xfs_defer_agfl_block(mp, tp->t_dfops, args->agno, bno, &targs.oinfo); } else { error = xfs_free_agfl_block(tp, args->agno, bno, agbp, diff --git a/libxfs/xfs_defer.c b/libxfs/xfs_defer.c index 5c1bb0d4b..30aa33e7e 100644 --- a/libxfs/xfs_defer.c +++ b/libxfs/xfs_defer.c @@ -350,9 +350,9 @@ xfs_defer_finish( * Note that this code can go away once all dfops users attach to the * associated tp. */ - ASSERT(!(*tp)->t_agfl_dfops || ((*tp)->t_agfl_dfops == dop)); - orig_dop = (*tp)->t_agfl_dfops; - (*tp)->t_agfl_dfops = dop; + ASSERT(!(*tp)->t_dfops || ((*tp)->t_dfops == dop)); + orig_dop = (*tp)->t_dfops; + (*tp)->t_dfops = dop; /* Until we run out of pending work to finish... */ while (xfs_defer_has_unfinished_work(dop)) { @@ -425,7 +425,7 @@ xfs_defer_finish( } out: - (*tp)->t_agfl_dfops = orig_dop; + (*tp)->t_dfops = orig_dop; if (error) trace_xfs_defer_finish_error((*tp)->t_mountp, dop, error); else