Skip to content

Commit cb04211

Browse files
Dave Chinnerdchinner
Dave Chinner
authored andcommitted
xfs: defered work could create precommits
To fix a AGI-AGF-inode cluster buffer deadlock, we need to move inode cluster buffer operations to the ->iop_precommit() method. However, this means that deferred operations can require precommits to be run on the final transaction that the deferred ops pass back to xfs_trans_commit() context. This will be exposed by attribute handling, in that the last changes to the inode in the attr set state machine "disappear" because the precommit operation is not run. Signed-off-by: Dave Chinner <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Dave Chinner <[email protected]>
1 parent 00dcd17 commit cb04211

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

fs/xfs/xfs_trans.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -970,6 +970,11 @@ __xfs_trans_commit(
970970
error = xfs_defer_finish_noroll(&tp);
971971
if (error)
972972
goto out_unreserve;
973+
974+
/* Run precommits from final tx in defer chain. */
975+
error = xfs_trans_run_precommits(tp);
976+
if (error)
977+
goto out_unreserve;
973978
}
974979

975980
/*

0 commit comments

Comments
 (0)