]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xfs: don't use the incore struct xfs_sb for offsets into struct xfs_dsb
authorDarrick J. Wong <djwong@kernel.org>
Tue, 2 Jul 2024 18:22:49 +0000 (11:22 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 2 Jul 2024 18:37:00 +0000 (11:37 -0700)
commitac3a0275165b4f80d9b7b516d6a8f8b308644fff
treef5aeb0f01d59840696447c79fb89e2f9b186ff76
parent47d4d5961fb9069803576ed3adb85b57a575a1b9
xfs: don't use the incore struct xfs_sb for offsets into struct xfs_dsb

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>
fs/xfs/libxfs/xfs_format.h
fs/xfs/libxfs/xfs_ondisk.h