xfs: factor out rtbitmap/summary initialization helpers
authorChristoph Hellwig <hch@lst.de>
Fri, 30 Aug 2024 22:36:59 +0000 (15:36 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Sun, 1 Sep 2024 15:58:19 +0000 (08:58 -0700)
commit2a95ffc44b610643c9d5d2665600d3fbefa5ec4f
treea7a2dfea61c3646bacf78738841f6e4ecfc0df7f
parent266e78aec4b9bac0400b09603a2bd24bea7268df
xfs: factor out rtbitmap/summary initialization helpers

Add helpers to libxfs that can be shared by growfs and mkfs for
initializing the rtbitmap and summary, and by passing the optional data
pointer also by repair for rebuilding them.  This will become even more
useful when the rtgroups feature adds a metadata header to each block,
which means even more shared code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
[djwong: minor documentation and data advance tweaks]
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
fs/xfs/libxfs/xfs_rtbitmap.c
fs/xfs/libxfs/xfs_rtbitmap.h
fs/xfs/xfs_rtalloc.c