]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: don't use the incore struct xfs_sb for offsets into struct xfs_dsb
authorDarrick J. Wong <djwong@kernel.org>
Wed, 2 Oct 2024 01:16:10 +0000 (18:16 -0700)
committerAndrey Albershteyn <aalbersh@redhat.com>
Fri, 4 Oct 2024 10:42:07 +0000 (12:42 +0200)
commit6a692a500894449bc1fc6d48b1bf40fa08aed50a
tree49a26324fe217088637cdeffadc5406cc2147c8e
parent2ab755da0ddd3f8595d2ed756c47111abe0013c0
xfs: don't use the incore struct xfs_sb for offsets into struct xfs_dsb

Source kernel commit: ac3a0275165b4f80d9b7b516d6a8f8b308644fff

Currently, the XFS_SB_CRC_OFF macro uses the incore superblock struct
(xfs_sb) to compute the address of sb_crc within the ondisk superblock
struct (xfs_dsb).  This is a landmine if we ever change the layout of
the incore superblock (as we're about to do), so redefine the macro
to use xfs_dsb to compute the layout of xfs_dsb.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
libxfs/xfs_format.h
libxfs/xfs_ondisk.h