]> www.infradead.org Git - users/hch/xfs.git/commit
xfs: use per-RTG bitmaps and summaries xfs-per-rtg-bitmap
authorChristoph Hellwig <hch@lst.de>
Wed, 31 Jul 2024 20:16:06 +0000 (13:16 -0700)
committerChristoph Hellwig <hch@lst.de>
Thu, 1 Aug 2024 01:25:46 +0000 (18:25 -0700)
commita20a115ce4258bcd890eddb67ff3b15c7a4e9157
tree2a11d8e829f193c71702df695813ccdcc823e403
parent42421b9b61ecfd14d430d2896eaa8485b22bcbd8
xfs: use per-RTG bitmaps and summaries

Allow RT allocation to scale by making the bitmap and summary inodes
per-RTG.  The 64-bit wide xfs_rtxnum_t becomes relative to the RTG and
now is the main data type used in the allocator - xfs_rgbno is left for
use with the rmap and refcount trees and can remain 32-bits as it never
exists for a pre-RTG file systems.

sb_rbmblocks and m_rsumlevels become per-RTG and we always allocate them
for full RTG, even when the last one doesn't use all blocks.  That
simplifies growfs a lot.

This needs a careful audit (and sparse loopback based tests) to verify
there are no overflows when converting to the xfs_rtxnum_t for
legacy file systems.  I'm almost sure we have issues with that
somewhere at the moment.

Signed-off-by: Christoph Hellwig <hch@lst.de>
41 files changed:
fs/xfs/libxfs/xfs_bmap.c
fs/xfs/libxfs/xfs_metafile.c
fs/xfs/libxfs/xfs_rtbitmap.c
fs/xfs/libxfs/xfs_rtbitmap.h
fs/xfs/libxfs/xfs_rtgroup.c
fs/xfs/libxfs/xfs_rtgroup.h
fs/xfs/libxfs/xfs_sb.c
fs/xfs/libxfs/xfs_trans_resv.c
fs/xfs/libxfs/xfs_types.c
fs/xfs/scrub/bmap.c
fs/xfs/scrub/bmap_repair.c
fs/xfs/scrub/common.c
fs/xfs/scrub/common.h
fs/xfs/scrub/cow_repair.c
fs/xfs/scrub/fscounters.c
fs/xfs/scrub/health.c
fs/xfs/scrub/inode_repair.c
fs/xfs/scrub/repair.c
fs/xfs/scrub/repair.h
fs/xfs/scrub/rtbitmap.c
fs/xfs/scrub/rtbitmap.h
fs/xfs/scrub/rtbitmap_repair.c
fs/xfs/scrub/rtrefcount_repair.c
fs/xfs/scrub/rtrmap_repair.c
fs/xfs/scrub/rtsummary.c
fs/xfs/scrub/rtsummary_repair.c
fs/xfs/scrub/scrub.c
fs/xfs/scrub/scrub.h
fs/xfs/scrub/stats.c
fs/xfs/scrub/trace.h
fs/xfs/xfs_discard.c
fs/xfs/xfs_extfree_item.c
fs/xfs/xfs_fsmap.c
fs/xfs/xfs_iomap.c
fs/xfs/xfs_mount.c
fs/xfs/xfs_mount.h
fs/xfs/xfs_qm.c
fs/xfs/xfs_reflink.c
fs/xfs/xfs_rtalloc.c
fs/xfs/xfs_rtalloc.h
fs/xfs/xfs_super.c