summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/attr_repair.h
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-04-15 14:54:44 -0700
committerDarrick J. Wong <djwong@kernel.org>2024-04-15 14:58:53 -0700
commit629fdaf5f5b1b7f7107ed4de04e0991a99501ced (patch)
tree65c5a2307471871d83aae2ffeafbdac60c638fc6 /fs/xfs/scrub/attr_repair.h
parentd2bd7eef4f217fc3e1ddf18b4f4eac848886bfa0 (diff)
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/scrub/attr_repair.h')
0 files changed, 0 insertions, 0 deletions