]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
tune2fs: prevent stable_inodes feature from being cleared
authorEric Biggers <ebiggers@google.com>
Wed, 1 Apr 2020 20:32:37 +0000 (13:32 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 10 Apr 2020 15:23:12 +0000 (11:23 -0400)
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 <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/tune2fs.c

index ca06c98b4c35a53a6eeb27c311d9ae3b7a725c6e..81f90cbf966bbe267791caedaed5192abebf9dc1 100644 (file)
@@ -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 |