summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/xfarray.h
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2022-07-28 12:55:21 -0700
committerDarrick J. Wong <djwong@kernel.org>2022-11-09 19:07:42 -0800
commitc12a54bcecb543a88f5f4bce45cae4dbb838623a (patch)
treebcb64adfac2d517b8d27297f4b98e1792f7a6855 /fs/xfs/scrub/xfarray.h
parent9f7ae40f7033f610b7bc428905f66b6164fc1005 (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>
Diffstat (limited to 'fs/xfs/scrub/xfarray.h')
0 files changed, 0 insertions, 0 deletions