]> www.infradead.org Git - users/dwmw2/linux.git/commit
xfs: factor out a xfs_growfs_rt_alloc_fake_mount helper
authorDarrick J. Wong <djwong@kernel.org>
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)
commit1029f08dc53920048e404cb151aaa76593ee31bb
tree053a92856a02c8dc29a02b0940d7a3a129bccc99
parentcb9cd6e56e482b56ddf052b66af6e9fb51b7fb33
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