]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs: ensure rtx mask/shift are correct after growfs
authorChristoph Hellwig <hch@lst.de>
Mon, 21 Oct 2024 00:10:42 +0000 (17:10 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 31 Oct 2024 22:45:02 +0000 (15:45 -0700)
commitd9e765646569e16d5ca785c56d3883e5768517db
treed45de9da401e5ef9f228ccccae0941d35977811b
parentcd0b8448a812bed151907312430dae4ae435ed62
xfs: ensure rtx mask/shift are correct after growfs

Source kernel commit: 86a0264ef26e90214a5bd74c72fb6e3455403bcf

When growfs sets an extent size, it doesn't updated the m_rtxblklog and
m_rtxblkmask values, which could lead to incorrect usage of them if they
were set before and can't be used for the new extent size.

Add a xfs_mount_sb_set_rextsize helper that updates the two fields, and
also use it when calculating the new RT geometry instead of disabling
the optimization there.

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>
libxfs/xfs_sb.c
libxfs/xfs_sb.h