VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/TextUserInterface.cpp
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2020-08-26 08:28:37 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2020-08-26 08:31:10 +0200
commit1fb59b58ee9ec9215880dfa218d709fae02f6a53 (patch)
tree4c36c513909f7e1d306fd28a21f7e8cadd47b065 /src/Main/TextUserInterface.cpp
parent0ab412a8de6a1557bd0f22d91a638e30b4f20ba8 (diff)
downloadVeraCrypt-1fb59b58ee9ec9215880dfa218d709fae02f6a53.tar.gz
VeraCrypt-1fb59b58ee9ec9215880dfa218d709fae02f6a53.zip
Linux: Reduce minimal size requirement for BTRFS support to 16 MiB by using mixed mode for volumes whose size is less than 109 MiB
Diffstat (limited to 'src/Main/TextUserInterface.cpp')
-rw-r--r--src/Main/TextUserInterface.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Main/TextUserInterface.cpp b/src/Main/TextUserInterface.cpp
index 95becfdf..0ad0b958 100644
--- a/src/Main/TextUserInterface.cpp
+++ b/src/Main/TextUserInterface.cpp
@@ -810,7 +810,7 @@ namespace VeraCrypt
}
if (options->Filesystem == VolumeCreationOptions::FilesystemType::Btrfs
- && (filesystemSize < VC_MIN_BTRFS_VOLUME_SIZE))
+ && (filesystemSize < VC_MIN_SMALL_BTRFS_VOLUME_SIZE))
{
throw_err (_("Specified volume size is too small to be used with Btrfs filesystem."));
}
@@ -939,7 +939,14 @@ namespace VeraCrypt
args.push_back ("-f");
if (options->Filesystem == VolumeCreationOptions::FilesystemType::Btrfs)
+ {
args.push_back ("-f");
+ if (filesystemSize < VC_MIN_LARGE_BTRFS_VOLUME_SIZE)
+ {
+ // use mixed mode for small BTRFS volumes
+ args.push_back ("-M");
+ }
+ }
args.push_back (string (virtualDevice));