]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
fuse2fs: support changing newer iflags
authorDarrick J. Wong <djwong@kernel.org>
Thu, 24 Apr 2025 21:43:39 +0000 (14:43 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 21 May 2025 14:25:07 +0000 (10:25 -0400)
Redefine FUSE2FS_MODIFIABLE_IFLAGS so that userspace can modify any
flags that the kernel can, except for the ones that fuse2fs lacks the
ability to change.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Link: https://lore.kernel.org/r/174553065123.1160461.3149004980436873980.stgit@frogsfrogsfrogs
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/fuse2fs.c

index 9182b5bf946133bd5464edac20dcfffefaedcfd3..6612c5a09ecb7f4ca60c90481390ce94d652c5b3 100644 (file)
@@ -2954,9 +2954,8 @@ out:
 }
 
 #define FUSE2FS_MODIFIABLE_IFLAGS \
-       (EXT2_IMMUTABLE_FL | EXT2_APPEND_FL | EXT2_NODUMP_FL | \
-        EXT2_NOATIME_FL | EXT3_JOURNAL_DATA_FL | EXT2_DIRSYNC_FL | \
-        EXT2_TOPDIR_FL)
+       (EXT2_FL_USER_MODIFIABLE & ~(EXT4_EXTENTS_FL | EXT4_CASEFOLD_FL | \
+                                    EXT3_JOURNAL_DATA_FL))
 
 static inline int set_iflags(struct ext2_inode_large *inode, __u32 iflags)
 {