]> www.infradead.org Git - users/hch/xfs.git/commit
xfs: factor out a xfs_growfs_rt_alloc_fake_mount helper
authorDarrick J. Wong <djwong@kernel.org>
Mon, 23 Sep 2024 20:41:13 +0000 (13:41 -0700)
committerChristoph Hellwig <hch@lst.de>
Wed, 9 Oct 2024 13:55:39 +0000 (15:55 +0200)
commit07d8f03e71ef3fc088ef2d8e9ea1c26f98d987f3
treeff3dac66ce1f01c237326a0ace601a764ce55706
parentd37c16609a0420590c2af62c46d429938581a1f4
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