]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs: condense directories after a mapping exchange operation
authorDarrick J. Wong <djwong@kernel.org>
Mon, 29 Jul 2024 23:22:36 +0000 (16:22 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 30 Jul 2024 00:00:59 +0000 (17:00 -0700)
commitfd6e011de53f2c7397088ea567a4edb678d15c5b
tree4ff27e7fb29ffd4354542a70679d38781ae480f5
parent312142132adb98fdfa0b74fb79e87f79617ced65
xfs: condense directories after a mapping exchange operation

Source kernel commit: da165fbde23b84591b6ccdf6749277d2d767b770

The previous commit added a new file mapping exchange flag that enables
us to perform post-swap processing on file2 once we're done exchanging
extent mappings.  Now add this ability for directories.

This isn't used anywhere right now, but we need to have the basic ondisk
flags in place so that a future online directory repair feature can
create salvaged dirents in a temporary directory and exchange the data
fork mappings when ready.  If one file is in extents format and the
other is inline, we will have to promote both to extents format to
perform the exchange.  After the exchange, we can try to condense the
fixed directory down to inline format if possible.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
libxfs/xfs_exchmaps.c