]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
xfsprogs: Fix default superblock attr bits
authorAllison Henderson <allison.henderson@oracle.com>
Tue, 9 Jan 2024 17:39:26 +0000 (09:39 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 10 Apr 2024 00:21:31 +0000 (17:21 -0700)
Recent parent pointer testing discovered that the default attr
configuration has XFS_SB_VERSION2_ATTR2BIT enabled but
XFS_SB_VERSION_ATTRBIT disabled.  This is incorrect since
XFS_SB_VERSION2_ATTR2BIT describes the format of the attr where
as XFS_SB_VERSION_ATTRBIT enables or disables attrs.  Fix this
by enableing XFS_SB_VERSION_ATTRBIT for either attr version 1 or 2

Signed-off-by: Allison Henderson <allison.henderson@oracle.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
mkfs/xfs_mkfs.c

index 53458590458d2e122a0fbc73af9e414f4c59a6b5..9bfd582b27546ab1c280d03fc65d08c7d69d88b8 100644 (file)
@@ -3439,7 +3439,7 @@ sb_set_features(
                sbp->sb_versionnum |= XFS_SB_VERSION_DALIGNBIT;
        if (fp->log_version == 2)
                sbp->sb_versionnum |= XFS_SB_VERSION_LOGV2BIT;
-       if (fp->attr_version == 1)
+       if (fp->attr_version >= 1)
                sbp->sb_versionnum |= XFS_SB_VERSION_ATTRBIT;
        if (fp->nci)
                sbp->sb_versionnum |= XFS_SB_VERSION_BORGBIT;