]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: defer should allow ->finish_item to request a new transaction
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 25 Oct 2016 00:26:53 +0000 (11:26 +1100)
committerDave Chinner <david@fromorbit.com>
Tue, 25 Oct 2016 00:26:53 +0000 (11:26 +1100)
commit0590692ed11e5854656d84e06f84b8f6f5fdcb5d
treecaafbdecff1b76cfc7446c90714de66a55291981
parent2cccc8cee7230141991f142c9ac5273de6514dd1
xfs: defer should allow ->finish_item to request a new transaction

Source kernel commit: 385d655861d221bb43ae69a9cfa9adbefe31ad00

When xfs_defer_finish calls ->finish_item, it's possible that
(refcount) won't be able to finish all the work in a single
transaction.  When this happens, the ->finish_item handler should
shorten the log done item's list count, update the work item to
reflect where work should continue, and return -EAGAIN so that
defer_finish knows to retain the pending item on the pending list,
roll the transaction, and restart processing where we left off.

Plumb in the code and document how this mechanism is supposed to work.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
libxfs/xfs_defer.c