]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
mkfs: preserve DIFLAG2_NREXT64 when setting other inode attributes
authorDarrick J. Wong <djwong@kernel.org>
Tue, 12 Jul 2022 18:28:33 +0000 (13:28 -0500)
committerEric Sandeen <sandeen@redhat.com>
Tue, 12 Jul 2022 18:28:33 +0000 (13:28 -0500)
Preserve the state of the NREXT64 inode flag when we're changing the
other flags2 fields.  This is only vital for the kernel version of this
function, but we should keep these in sync.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/util.c

index ef01fcf851db91d482e04f11b1818dedee9b3f67..d2389198ca47033b8b7321ca0dbed774e30731dc 100644 (file)
@@ -198,7 +198,8 @@ xfs_flags2diflags2(
 {
        uint64_t                di_flags2 =
                (ip->i_diflags2 & (XFS_DIFLAG2_REFLINK |
-                                  XFS_DIFLAG2_BIGTIME));
+                                  XFS_DIFLAG2_BIGTIME |
+                                  XFS_DIFLAG2_NREXT64));
 
        if (xflags & FS_XFLAG_DAX)
                di_flags2 |= XFS_DIFLAG2_DAX;