]> www.infradead.org Git - users/hch/xfs.git/commit
xfs: factor out a xfs_growfs_rt_alloc_fake_mount helper rt-cleanups
authorChristoph Hellwig <hch@lst.de>
Tue, 27 Aug 2024 03:49:54 +0000 (05:49 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 27 Aug 2024 03:49:54 +0000 (05:49 +0200)
commitcb3b6f4e0afe6d10167fc7cd9405293ea1c88a75
tree4a9916ec66fc04fb5f1e9d51fa5a8ea9f2af2fd6
parent1634451dbcf8e9456032559458a55bebc6ac8792
xfs: factor out a xfs_growfs_rt_alloc_fake_mount helper

Split the code to set up a fake mount point to calculate new RT
geometry out of xfs_growfs_rt_bmblock so that it can be reused.

Note that this changes the rmblocks calculation method to be based
on the passed in rblocks and extsize and not the explicitly passed
one, but both methods will always lead to the same result.  The new
version just does a little bit more math while being more general.

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/xfs_rtalloc.c