]> www.infradead.org Git - users/hch/xfsprogs.git/commit
xfs: online repair of the realtime rmap btree
authorDarrick J. Wong <djwong@kernel.org>
Mon, 24 Feb 2025 18:21:50 +0000 (10:21 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 25 Feb 2025 17:15:58 +0000 (09:15 -0800)
commitaa55ff9f9e631f88417a772b4b0dddf780e83ea1
treed6272f41fde6b86c810c04ab275b71a9d881a0ec
parentcbffd34fe943965417eb9ca718b4301d10a1f51f
xfs: online repair of the realtime rmap btree

Source kernel commit: 6a849bd81b69ccbda5b766cc700f0be86194e4d1

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>
libxfs/xfs_btree_staging.c
libxfs/xfs_rtrmap_btree.c
libxfs/xfs_rtrmap_btree.h