Increase the minimal remount scratch size to 64MiB for F2FS scratch

F2FS requires a larger minimal size than the current value of 16MiB.

Bug: 171368484
Fixes: 171368484
Test: Presubmit
Change-Id: I085d91634ada673388b07a0f5c6b1847e261b7f8
This commit is contained in:
Yi-Yo Chiang 2021-08-09 07:38:40 +00:00
parent 6e3f64e7d8
commit e6c21b9be1

View file

@ -1133,7 +1133,7 @@ static bool CreateScratchOnData(std::string* scratch_device, bool* partition_exi
return false;
}
if (!images->BackingImageExists(partition_name)) {
static constexpr uint64_t kMinimumSize = 16_MiB;
static constexpr uint64_t kMinimumSize = 64_MiB;
static constexpr uint64_t kMaximumSize = 2_GiB;
uint64_t size = std::clamp(info.size / 2, kMinimumSize, kMaximumSize);