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

Source kernel commit: 497d7a2608f8b7329e92bdaaf745ca127a582ad9

Add a new file mapping exchange flag that enables us to perform
post-exchange processing on file2 once we're done exchanging the extent
mappings.  If we were swapping mappings between extended attribute
forks, we want to be able to convert file2's attr fork from block to
inline format.

(This implies that all fork contents are exchanged.)

This isn't used anywhere right now, but we need to have the basic ondisk
flags in place so that a future online xattr repair feature can create
salvaged attrs in a temporary file and exchange the attr 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 file's attr fork
back 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
libxfs/xfs_exchmaps.h