]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs_db/mdrestore/repair: don't use the incore struct xfs_sb for offsets into struct...
authorDarrick J. Wong <djwong@kernel.org>
Wed, 2 Oct 2024 01:25:16 +0000 (18:25 -0700)
committerAndrey Albershteyn <aalbersh@redhat.com>
Fri, 4 Oct 2024 11:14:20 +0000 (13:14 +0200)
commit34f035799f3013975cf670a4d741bbcbfb8d1971
tree4495c9f5a1f66bb921a5de90c47590be4d6a4bb5
parentcca845516ea667f8f6bfdcf955764305dea7306b
xfs_db/mdrestore/repair: 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.

Port the userspace utilities to the new code just like we did for the
kernel.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
db/sb.c
mdrestore/xfs_mdrestore.c
repair/agheader.c