From 1fb59b58ee9ec9215880dfa218d709fae02f6a53 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Wed, 26 Aug 2020 08:28:37 +0200 Subject: Linux: Reduce minimal size requirement for BTRFS support to 16 MiB by using mixed mode for volumes whose size is less than 109 MiB --- src/Main/TextUserInterface.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/Main/TextUserInterface.cpp') 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)); -- cgit v1.2.3