xfs: condense symbolic links after a mapping exchange operation
authorDarrick J. Wong <djwong@kernel.org>
Mon, 15 Apr 2024 21:54:21 +0000 (14:54 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 15 Apr 2024 21:54:21 +0000 (14:54 -0700)
commit33a9be2b7016e79f47c4c1b523a0aa59d41893c0
treebe7d04eb76082226c8f99521824af159ea46a2d0
parentda165fbde23b84591b6ccdf6749277d2d767b770
xfs: condense symbolic links after a mapping exchange operation

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

This isn't used anywhere right now, but we need to have the basic ondisk
flags in place so that a future online symlink repair feature can
salvage the remote target in a temporary link 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 symlink
down to inline format if possible.

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