aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2022-07-12 13:28:33 -0500
committerEric Sandeen <sandeen@redhat.com>2022-07-12 13:28:33 -0500
commitb6fd10341170378b571d2de0e73c870f8b8697c0 (patch)
tree08a16ee0e665565632f2073da853562477c68da0
parent0ec4cd6459893cf8866c872085c61414e41235bb (diff)
downloadxfsprogs-dev-b6fd10341170378b571d2de0e73c870f8b8697c0.tar.gz
mkfs: preserve DIFLAG2_NREXT64 when setting other inode attributes
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>
-rw-r--r--libxfs/util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libxfs/util.c b/libxfs/util.c
index ef01fcf851..d2389198ca 100644
--- a/libxfs/util.c
+++ b/libxfs/util.c
@@ -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;