]> www.infradead.org Git - users/hch/xfsprogs.git/commit
xfs: use realtime EFI to free extents when rtgroups are enabled
authorDarrick J. Wong <djwong@kernel.org>
Wed, 3 Jul 2024 21:22:04 +0000 (14:22 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 16 Jul 2024 22:49:15 +0000 (15:49 -0700)
commit5b6c6b71e7faf7180ece7838a14f30b48962d2c6
tree53ab35b874d82bcf3ebdbbf0388cac7a1f6cd754
parentc1536ea66b2a08a6f474d55570b52ae8ecc2d865
xfs: use realtime EFI to free extents when rtgroups are enabled

When rmap is enabled, XFS expects a certain order of operations, which
is: 1) remove the file mapping, 2) remove the reverse mapping, and then
3) free the blocks.  When reflink is enabled, XFS replaces (3) with a
deferred refcount decrement operation that can schedule freeing the
blocks if that was the last refcount.

For realtime files, xfs_bmap_del_extent_real tries to do 1 and 3 in the
same transaction, which will break both rmap and reflink unless we
switch it to use realtime EFIs.  Both rmap and reflink depend on the
rtgroups feature, so let's turn on EFIs for all rtgroups filesystems.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
libxfs/xfs_bmap.c