]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xfs: online repair of the realtime rmap btree
authorDarrick J. Wong <djwong@kernel.org>
Thu, 21 Nov 2024 00:20:42 +0000 (16:20 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 23 Dec 2024 21:06:09 +0000 (13:06 -0800)
commit6a849bd81b69ccbda5b766cc700f0be86194e4d1
tree1e3f61a7626351d96401b190a7e47e35e840b25c
parentc6904f6788b79e8d2275a55cbb71b4992be29d92
xfs: online repair of the realtime rmap btree

Repair the realtime rmap btree while mounted.  Similar to the regular
rmap btree repair code, we walk the data fork mappings of every realtime
file in the filesystem to collect reverse-mapping records in an xfarray.
Then we sort the xfarray, and use the btree bulk loader to create a new
rtrmap btree ondisk.  Finally, we swap the btree roots, and reap the old
blocks in the usual way.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
12 files changed:
fs/xfs/Makefile
fs/xfs/libxfs/xfs_btree_staging.c
fs/xfs/libxfs/xfs_rtrmap_btree.c
fs/xfs/libxfs/xfs_rtrmap_btree.h
fs/xfs/scrub/common.c
fs/xfs/scrub/common.h
fs/xfs/scrub/repair.c
fs/xfs/scrub/repair.h
fs/xfs/scrub/rtrmap.c
fs/xfs/scrub/rtrmap_repair.c [new file with mode: 0644]
fs/xfs/scrub/scrub.c
fs/xfs/scrub/trace.h