]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
mkfs: always use new_diflags2 to initialize new inodes
authorDarrick J. Wong <djwong@kernel.org>
Tue, 12 Jul 2022 18:30:33 +0000 (13:30 -0500)
committerEric Sandeen <sandeen@redhat.com>
Tue, 12 Jul 2022 18:30:33 +0000 (13:30 -0500)
commitad8a3d7cc897059872e9e9f92ac57cd55d9ba89d
treeedd4540a9213bd0bafde8b31e8687d67e9c417c0
parent42efbb99fb68f0359b492c13792e035c3e056e86
mkfs: always use new_diflags2 to initialize new inodes

The new_diflags2 field that's set in the inode geometry represent
features that we want enabled for /all/ newly created inodes.
Unfortunately, mkfs doesn't do that because xfs_flags2diflags2 doesn't
read new_diflags2.  Change the new_diflags2 logic to match the kernel.

Without this fix, the root directory gets created without the
DIFLAG2_NREXT64 iflag set, but files created by a protofile /do/ have it
turned on.

This wasn't an issue with DIFLAG2_BIGTIME because xfs_trans_log_inode
quietly turns that on whenever possible.

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