aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_bmap_util.c
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2018-08-01 10:20:32 -0400
committerDarrick J. Wong <darrick.wong@oracle.com>2018-08-03 02:05:14 -0400
commita8198666fb755e129c2fe92819774256ec26c79c (patch)
tree4eb28b2dcb562575ba2aa825110b259cdf6d44c3 /fs/xfs/xfs_bmap_util.c
parent82ff27bc52a88cb5cc400bfa64e210d3ec8dfebd (diff)
xfs: automatic dfops inode relogging
Inodes that are held across deferred operations are explicitly joined to the dfops structure to ensure appropriate relogging. While inodes are currently joined explicitly, we can detect the conditions that require relogging at dfops finish time by inspecting the transaction item list for inodes with ili_lock_flags == 0. Replace the xfs_defer_ijoin() infrastructure with such detection and automatic relogging of held inodes. This eliminates the need for the per-dfops inode list, replaced by an on-stack variant in xfs_defer_trans_roll(). 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>
Diffstat (limited to 'fs/xfs/xfs_bmap_util.c')
-rw-r--r--fs/xfs/xfs_bmap_util.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c
index 0c58a66b39e5..30ac1300dc49 100644
--- a/fs/xfs/xfs_bmap_util.c
+++ b/fs/xfs/xfs_bmap_util.c
@@ -979,7 +979,6 @@ xfs_alloc_file_space(
979 /* 979 /*
980 * Complete the transaction 980 * Complete the transaction
981 */ 981 */
982 xfs_defer_ijoin(tp->t_dfops, ip);
983 error = xfs_trans_commit(tp); 982 error = xfs_trans_commit(tp);
984 xfs_iunlock(ip, XFS_ILOCK_EXCL); 983 xfs_iunlock(ip, XFS_ILOCK_EXCL);
985 if (error) 984 if (error)
@@ -1037,8 +1036,6 @@ xfs_unmap_extent(
1037 if (error) 1036 if (error)
1038 goto out_trans_cancel; 1037 goto out_trans_cancel;
1039 1038
1040 xfs_defer_ijoin(tp->t_dfops, ip);
1041
1042 error = xfs_trans_commit(tp); 1039 error = xfs_trans_commit(tp);
1043out_unlock: 1040out_unlock:
1044 xfs_iunlock(ip, XFS_ILOCK_EXCL); 1041 xfs_iunlock(ip, XFS_ILOCK_EXCL);
@@ -1624,7 +1621,6 @@ xfs_swap_extent_rmap(
1624 if (error) 1621 if (error)
1625 goto out_defer; 1622 goto out_defer;
1626 1623
1627 xfs_defer_ijoin(tp->t_dfops, ip);
1628 error = xfs_defer_finish(tpp); 1624 error = xfs_defer_finish(tpp);
1629 tp = *tpp; 1625 tp = *tpp;
1630 if (error) 1626 if (error)