From 9292c09c06454db4caf71c12ab669b470c82e218 Mon Sep 17 00:00:00 2001 From: Dmitrii Merkurev Date: Wed, 3 May 2023 05:39:51 +0100 Subject: [PATCH] remount: Increase scratch size from 50% to 85% of available data adb remount clearly indicates that the user will use a scratch partition to modify RO content. In this CL we're trying to be more aggressive and take more space from data to scratch to improve the developers experience. Bug: 228945443 Test: launch cvd with updated value and check it reflects Change-Id: Ied9cee6e98d3b2dd594babcf213071a80bd3cf14 Signed-off-by: Dmitrii Merkurev --- fs_mgr/fs_mgr_overlayfs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs_mgr/fs_mgr_overlayfs.cpp b/fs_mgr/fs_mgr_overlayfs.cpp index 6349c20a9..ef436e580 100644 --- a/fs_mgr/fs_mgr_overlayfs.cpp +++ b/fs_mgr/fs_mgr_overlayfs.cpp @@ -1083,7 +1083,7 @@ static inline uint64_t GetIdealDataScratchSize() { return 0; } - auto ideal_size = std::min(super_info.size, (uint64_t(s.f_frsize) * s.f_bfree) / 2); + auto ideal_size = std::min(super_info.size, uint64_t(s.f_frsize * s.f_bfree * 0.85)); // Align up to the filesystem block size. if (auto remainder = ideal_size % s.f_bsize; remainder > 0) {