xfs: calculate RT bitmap and summary blocks based on sb_rextents
authorChristoph Hellwig <hch@lst.de>
Mon, 4 Nov 2024 04:19:12 +0000 (20:19 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 5 Nov 2024 21:38:37 +0000 (13:38 -0800)
commitcb9cd6e56e482b56ddf052b66af6e9fb51b7fb33
treed696b049e71b111a8971e7712f3a8cbc56e39366
parentc1442d22a02ac37b0fdfdbfc2bb1e5c2c6673df5
xfs: calculate RT bitmap and summary blocks based on sb_rextents

Use the on-disk rextents to calculate the bitmap and summary blocks
instead of the calculated one so that we can refactor the helpers for
calculating them.

As the RT bitmap and summary scrubbers already check that sb_rextents
match the block count this does not change coverage of the scrubber.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
fs/xfs/scrub/rtbitmap.c
fs/xfs/scrub/rtsummary.c