]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs: check unused nlink fields in the ondisk inode
authorDarrick J. Wong <djwong@kernel.org>
Mon, 29 Jul 2024 23:22:40 +0000 (16:22 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 30 Jul 2024 00:01:00 +0000 (17:01 -0700)
commit8c7b1e9559ccd0f2df07eab5ce2efeaeb684c6e6
treef262887308468bdae8f958e2889373afac1f407c
parenta73bb88013e91c51ebb2f5f92001db8058ea4910
xfs: check unused nlink fields in the ondisk inode

Source kernel commit: 40cb8613d6122ca80a9e42e4cecc4d308c3b80fb

v2/v3 inodes use di_nlink and not di_onlink; and v1 inodes use di_onlink
and not di_nlink.  Whichever field is not in use, make sure its contents
are zero, and teach xfs_scrub to fix that if it is.

This clears a bunch of missing scrub failure errors in xfs/385 for
core.onlink.

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