aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode.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_inode.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_inode.c')
-rw-r--r--fs/xfs/xfs_inode.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 441c8593cfd7..7bb46a0eecfc 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -1569,7 +1569,6 @@ xfs_itruncate_extents_flags(
1569 * Duplicate the transaction that has the permanent 1569 * Duplicate the transaction that has the permanent
1570 * reservation and commit the old transaction. 1570 * reservation and commit the old transaction.
1571 */ 1571 */
1572 xfs_defer_ijoin(tp->t_dfops, ip);
1573 error = xfs_defer_finish(&tp); 1572 error = xfs_defer_finish(&tp);
1574 if (error) 1573 if (error)
1575 goto out_bmap_cancel; 1574 goto out_bmap_cancel;
@@ -1810,7 +1809,6 @@ xfs_inactive_ifree(
1810 * Just ignore errors at this point. There is nothing we can do except 1809 * Just ignore errors at this point. There is nothing we can do except
1811 * to try to keep going. Make sure it's not a silent error. 1810 * to try to keep going. Make sure it's not a silent error.
1812 */ 1811 */
1813 xfs_defer_ijoin(tp->t_dfops, ip);
1814 error = xfs_trans_commit(tp); 1812 error = xfs_trans_commit(tp);
1815 if (error) 1813 if (error)
1816 xfs_notice(mp, "%s: xfs_trans_commit returned error %d", 1814 xfs_notice(mp, "%s: xfs_trans_commit returned error %d",