aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_bmap.c
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2018-08-01 07:20:32 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2018-08-02 23:05:14 -0700
commita8198666fb755e129c2fe92819774256ec26c79c (patch)
tree4eb28b2dcb562575ba2aa825110b259cdf6d44c3 /fs/xfs/libxfs/xfs_bmap.c
parentxfs: automatic dfops buffer relogging (diff)
downloadlinux-dev-a8198666fb755e129c2fe92819774256ec26c79c.tar.xz
linux-dev-a8198666fb755e129c2fe92819774256ec26c79c.zip
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 '')
-rw-r--r--fs/xfs/libxfs/xfs_bmap.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index 71687d805f79..5cd490dc891a 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -1119,7 +1119,6 @@ xfs_bmap_add_attrfork(
xfs_log_sb(tp);
}
- xfs_defer_ijoin(tp->t_dfops, ip);
error = xfs_trans_commit(tp);
xfs_iunlock(ip, XFS_ILOCK_EXCL);
return error;
@@ -5987,7 +5986,6 @@ __xfs_bmap_add(
int whichfork,
struct xfs_bmbt_irec *bmap)
{
- int error;
struct xfs_bmap_intent *bi;
trace_xfs_bmap_defer(mp,
@@ -6006,12 +6004,6 @@ __xfs_bmap_add(
bi->bi_whichfork = whichfork;
bi->bi_bmap = *bmap;
- error = xfs_defer_ijoin(dfops, bi->bi_owner);
- if (error) {
- kmem_free(bi);
- return error;
- }
-
xfs_defer_add(dfops, XFS_DEFER_OPS_TYPE_BMAP, &bi->bi_list);
return 0;
}