]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: xfs_defer_capture should absorb remaining block reservations
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 12 Nov 2020 22:21:10 +0000 (17:21 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Thu, 12 Nov 2020 22:21:10 +0000 (17:21 -0500)
commit75d8bf7e082a7fd55d46eb3c90b3a570ee9f6714
tree55fc0e88c69c9ca6f97fabbc97d067af473822e9
parentb1d41c43df568516fef1d17e97f19065c39b5a16
xfs: xfs_defer_capture should absorb remaining block reservations

Source kernel commit: 4f9a60c48078c0efa3459678fa8d6e050e8ada5d

When xfs_defer_capture extracts the deferred ops and transaction state
from a transaction, it should record the remaining block reservations so
that when we continue the dfops chain, we can reserve the same number of
blocks to use.  We capture the reservations for both data and realtime
volumes.

This adds the requirement that every log intent item recovery function
must be careful to reserve enough blocks to handle both itself and all
defer ops that it can queue.  On the other hand, this enables us to do
away with the handwaving block estimation nonsense that was going on in
xlog_finish_defer_ops.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
include/xfs_trans.h
libxfs/xfs_defer.c
libxfs/xfs_defer.h