diff options
author | Daniel Rosenberg <drosen@google.com> | 2020-06-10 21:21:42 -0700 |
---|---|---|
committer | Daniel Rosenberg <drosen@google.com> | 2020-06-24 21:26:04 +0000 |
commit | 5507593a03183b193c2684458148484010879dca (patch) | |
tree | bb23bb66c95a5894dee88b105553cb80e185f0b9 | |
parent | 0c0b65bdccd6b70d87d0532fe5539f037610cf03 (diff) | |
download | e2fsprogs-5507593a03183b193c2684458148484010879dca.tar.gz |
ANDROID: tune2fs: Support encrypt+casefold
In preparation for upcoming kernel changes that will make the kernel
support both encryption and casefolding at the same time, allow tune2fs
to enable both features at the same time.
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 159836819
Test: Create fs with casefold and encryption enabled via tune2fs
Change-Id: I36537a8b6dc5e2997b7016212f9b574c76673067
-rw-r--r-- | misc/tune2fs.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/misc/tune2fs.c b/misc/tune2fs.c index d9aba852..b01497cb 100644 --- a/misc/tune2fs.c +++ b/misc/tune2fs.c @@ -1405,12 +1405,6 @@ mmp_error: } if (FEATURE_ON(E2P_FEATURE_INCOMPAT, EXT4_FEATURE_INCOMPAT_ENCRYPT)) { - if (ext2fs_has_feature_casefold(sb)) { - fputs(_("Cannot enable encrypt feature on filesystems " - "with the encoding feature enabled.\n"), - stderr); - return 1; - } fs->super->s_encrypt_algos[0] = EXT4_ENCRYPTION_MODE_AES_256_XTS; fs->super->s_encrypt_algos[1] = @@ -1418,12 +1412,6 @@ mmp_error: } if (FEATURE_ON(E2P_FEATURE_INCOMPAT, EXT4_FEATURE_INCOMPAT_CASEFOLD)) { - if (ext2fs_has_feature_encrypt(sb)) { - fputs(_("Cannot enable casefold feature on filesystems " - "with the encrypt feature enabled.\n"), - stderr); - return 1; - } if (mount_flags & EXT2_MF_MOUNTED) { fputs(_("The casefold feature may only be enabled when " "the filesystem is unmounted.\n"), stderr); @@ -2173,11 +2161,6 @@ static int parse_extended_opts(ext2_filsys fs, const char *opts) r_usage++; continue; } - if (ext2fs_has_feature_encrypt(sb)) { - fprintf(stderr, _("error: Cannot enable casefolding if encryption is set\n")); - r_usage++; - continue; - } if (mount_flags & EXT2_MF_MOUNTED) { fputs(_("The casefold feature may only be enabled when " "the filesystem is unmounted.\n"), stderr); |