summaryrefslogtreecommitdiff
path: root/misc/tune2fs.c
diff options
context:
space:
mode:
authorDaniel Rosenberg <drosen@google.com>2020-06-10 21:21:42 -0700
committerTheodore Ts'o <tytso@mit.edu>2021-01-27 23:46:39 -0500
commit23fc0e6e46f061175ef2af03538e137a490d17fb (patch)
treede3e10f24e1d8bb0494983674aed9616c29fe5f8 /misc/tune2fs.c
parent79661036b427a890b1d3d435ffab7c811ec9e5f4 (diff)
downloade2fsprogs-23fc0e6e46f061175ef2af03538e137a490d17fb.tar.gz
AOSP: 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> Google-Bug-Id: 138322712 Test: Create fs with casefold and encryption enabled via tune2fs Change-Id: I36537a8b6dc5e2997b7016212f9b574c76673067 From AOSP commit: 44ac9dccd9853cc9807f0d6ce952bdcdeb93954a
Diffstat (limited to 'misc/tune2fs.c')
-rw-r--r--misc/tune2fs.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/misc/tune2fs.c b/misc/tune2fs.c
index 15fa36f2..cdf343c8 100644
--- a/misc/tune2fs.c
+++ b/misc/tune2fs.c
@@ -1419,12 +1419,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] =
@@ -1432,12 +1426,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);
@@ -2190,11 +2178,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);