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>
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;
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;
}
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
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,
* 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)) {
}
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