]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: rename xfs_trans ->t_agfl_dfops to ->t_dfops
authorBrian Foster <bfoster@redhat.com>
Thu, 4 Oct 2018 19:23:01 +0000 (14:23 -0500)
committerEric Sandeen <sandeen@redhat.com>
Thu, 4 Oct 2018 19:23:01 +0000 (14:23 -0500)
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 <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
include/xfs_trans.h
libxfs/trans.c
libxfs/xfs_alloc.c
libxfs/xfs_defer.c

index fffc99bbea1cbbfc8e8d59b6e3cecd3bb9de4489..3cabf3d23c6679f03474b7b38907de3b972e04aa 100644 (file)
@@ -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;
 
index e0567d504c0218612ccaa4a9c7947a9678269ca7..2fef72914d5819c88ef3d1b6d84d4c791c7a0c00 100644 (file)
@@ -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
index 5ead56d290a317934d4c39119d78b0782e011a75..da7c51d397124ade1a3de867940c1f0fddec3738 100644 (file)
@@ -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,
index 5c1bb0d4bb67cfc756cde748f9c661b3046d28ff..30aa33e7e5dc018853712fd46dfc83a6fdd917f2 100644 (file)
@@ -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