xfs: adjust the incore perag block_count when shrinking
authorDarrick J. Wong <djwong@kernel.org>
Wed, 11 Oct 2023 19:35:20 +0000 (12:35 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 11 Oct 2023 19:35:20 +0000 (12:35 -0700)
commit6868b8505c807ad9397d78cc4e07cb1cb3582152
tree3e078a4f6e3a3d88a052bcddb1ce1643b8eb8d40
parent94f6f0550c625fab1f373bb86a6669b45e9748b3
xfs: adjust the incore perag block_count when shrinking

If we reduce the number of blocks in an AG, we must update the incore
geometry values as well.

Fixes: 0800169e3e2c9 ("xfs: Pre-calculate per-AG agbno geometry")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/libxfs/xfs_ag.c