]> www.infradead.org Git - users/hch/xfsprogs.git/commit
xfs: ensure rtx mask/shift are correct after growfs
authorChristoph Hellwig <hch@lst.de>
Tue, 15 Oct 2024 19:43:40 +0000 (12:43 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 1 Nov 2024 20:44:39 +0000 (13:44 -0700)
commitce4a8cbbb6e6bf6d2bf0edb9185db835afbe2153
treed45de9da401e5ef9f228ccccae0941d35977811b
parenta6b96b48a5461d25feda58dd25b49c3116d5b74c
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