summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/repair.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2022-07-28 12:33:50 -0700
committerDarrick J. Wong <djwong@kernel.org>2022-11-09 19:07:41 -0800
commit85bb2302750fc8105aff6488d554c950db57c073 (patch)
tree86698d9fa2ab731d5eea731a957bbfdd1ecf96ac /fs/xfs/scrub/repair.c
parentfed63eef5265208ded3007f01ce99a4f33a8ac2b (diff)
xfs: teach the tempfile to support atomic extent swapping
Create some new routines to exchange the contents of a temporary file created to stage a repair with another ondisk file. This will be used by the realtime summary repair function to commit atomically the new rtsummary data, which will be staged in the tempfile. The rest of XFS coordinates access to the realtime metadata inodes solely through the ILOCK. For repair to hold its exclusive access to the realtime summary file, it has to allocate a single large transaction and roll it repeatedly throughout the repair while holding the ILOCK. In turn, this means that for now there's only a partial swapext implementation for the temporary file, because we can only work within an existing transaction. Hence the only tempswap functions needed here are to estimate the resource requirements of swapext between, reserve more space/quota to an existing transaction, and kick off the actual swap. The rest will be added in a later patch in preparation for repairing xattrs and directories. Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/scrub/repair.c')
0 files changed, 0 insertions, 0 deletions