diff options
author | Darrick J. Wong <djwong@kernel.org> | 2024-04-15 14:54:44 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2024-04-15 14:58:53 -0700 |
commit | 629fdaf5f5b1b7f7107ed4de04e0991a99501ced (patch) | |
tree | 65c5a2307471871d83aae2ffeafbdac60c638fc6 /fs/xfs/Makefile | |
parent | d2bd7eef4f217fc3e1ddf18b4f4eac848886bfa0 (diff) | |
download | linux-629fdaf5f5b1b7f7107ed4de04e0991a99501ced.tar.gz linux-629fdaf5f5b1b7f7107ed4de04e0991a99501ced.tar.bz2 linux-629fdaf5f5b1b7f7107ed4de04e0991a99501ced.zip |
xfs: use atomic extent swapping to fix user file fork data
Build on the code that was recently added to the temporary repair file
code so that we can atomically switch the contents of any file fork,
even if the fork is in local format. The upcoming functions to repair
xattrs, directories, and symlinks will need that capability.
Repair can lock out access to these user files by holding IOLOCK_EXCL on
these user files. Therefore, it is safe to drop the ILOCK of both the
file being repaired and the tempfile being used for staging, and cancel
the scrub transaction. We do this so that we can reuse the resource
estimation and transaction allocation functions used by a regular file
exchange operation.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/Makefile')
0 files changed, 0 insertions, 0 deletions