diff options
author | Eric Biggers <ebiggers@google.com> | 2019-10-21 16:30:43 -0700 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2019-10-31 19:32:27 -0400 |
commit | 2d2d00c6c6dc3f2aa72dccec635885f03a37a14f (patch) | |
tree | 8d59bf318e5dc3fb045b8f85bc1d9c05801fedaa /misc/tune2fs.c | |
parent | fa51c655f5c3d5d56d610c709ab57e255f59c974 (diff) | |
download | e2fsprogs-2d2d00c6c6dc3f2aa72dccec635885f03a37a14f.tar.gz |
AOSP: support the stable_inodes feature
Reserve the codepoint for EXT4_FEATURE_COMPAT_STABLE_INODES, allow it to
be set and cleared, and teach resize2fs to forbid shrinking the
filesystem if it is set.
This feature will allow the use of encryption policies where the inode
number is included in the IVs (initialization vectors) for encryption,
so data would be corrupted if the inodes were to be renumbered.
For more details, see the kernel patchset:
https://lkml.kernel.org/linux-fsdevel/20191021230355.23136-1-ebiggers@kernel.org/T/#u
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
From AOSP commit: 9aa30c254dd57df54f00c5d520b7ac867ad7ca68
Diffstat (limited to 'misc/tune2fs.c')
-rw-r--r-- | misc/tune2fs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/misc/tune2fs.c b/misc/tune2fs.c index 77a45875..8368a733 100644 --- a/misc/tune2fs.c +++ b/misc/tune2fs.c @@ -150,7 +150,8 @@ static __u32 ok_features[3] = { /* Compat */ EXT3_FEATURE_COMPAT_HAS_JOURNAL | EXT2_FEATURE_COMPAT_DIR_INDEX | - EXT4_FEATURE_COMPAT_FAST_COMMIT, + EXT4_FEATURE_COMPAT_FAST_COMMIT | + EXT4_FEATURE_COMPAT_STABLE_INODES, /* Incompat */ EXT2_FEATURE_INCOMPAT_FILETYPE | EXT3_FEATURE_INCOMPAT_EXTENTS | @@ -180,7 +181,8 @@ 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_FAST_COMMIT | + EXT4_FEATURE_COMPAT_STABLE_INODES, /* Incompat */ EXT2_FEATURE_INCOMPAT_FILETYPE | EXT4_FEATURE_INCOMPAT_FLEX_BG | |