From: Eric Biggers Date: Wed, 1 Apr 2020 20:32:37 +0000 (-0700) Subject: tune2fs: prevent stable_inodes feature from being cleared X-Git-Tag: v1.46.0~56 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=950002f7ce619a3a5014f980eb02608cbae24f46;p=tools%2Fe2fsprogs.git tune2fs: prevent stable_inodes feature from being cleared Similar to encrypt and verity, once the stable_inodes feature has been enabled there may be files anywhere on the filesystem that require this feature. Therefore, in general it's unsafe to allow clearing it. Don't allow tune2fs to do so. Like encrypt and verity, it can still be cleared with debugfs if someone really knows what they're doing. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o --- diff --git a/misc/tune2fs.c b/misc/tune2fs.c index ca06c98..81f90cb 100644 --- a/misc/tune2fs.c +++ b/misc/tune2fs.c @@ -181,8 +181,7 @@ static __u32 clear_ok_features[3] = { EXT3_FEATURE_COMPAT_HAS_JOURNAL | EXT2_FEATURE_COMPAT_RESIZE_INODE | EXT2_FEATURE_COMPAT_DIR_INDEX | - EXT4_FEATURE_COMPAT_FAST_COMMIT | - EXT4_FEATURE_COMPAT_STABLE_INODES, + EXT4_FEATURE_COMPAT_FAST_COMMIT, /* Incompat */ EXT2_FEATURE_INCOMPAT_FILETYPE | EXT4_FEATURE_INCOMPAT_FLEX_BG |