add patch for fs_mgr overlay threshold

This commit is contained in:
Peter Cai 2022-04-28 21:23:44 -04:00
parent 22526128c0
commit 4207e6af29
4 changed files with 38 additions and 3 deletions

View File

@ -1,7 +1,7 @@
From 6e17845221ec781e003432b96c1d08dc582859f3 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Thu, 7 Oct 2021 15:48:11 -0400
Subject: [PATCH 1/3] Stop overriding system properties from vendor
Subject: [PATCH 1/4] Stop overriding system properties from vendor
This is annoying to disable apexes, or force adb

View File

@ -1,7 +1,7 @@
From 40f60ce5f786f8121aebcb8e1521d2edb5bb7f43 Mon Sep 17 00:00:00 2001
From: Isaac Chen <tingyi364@gmail.com>
Date: Wed, 23 Jun 2021 13:07:30 +0800
Subject: [PATCH 2/3] init: Do not start console service when debuggable
Subject: [PATCH 2/4] init: Do not start console service when debuggable
Google added a check for this in R, when it's running it will show a
notification about that performance is impacted.

View File

@ -1,7 +1,7 @@
From 74faf05b941682bd1930b92ae879c8baba09d6ac Mon Sep 17 00:00:00 2001
From: Leo Yan <leo.yan@linaro.org>
Date: Fri, 4 Jun 2021 15:19:33 +0100
Subject: [PATCH 3/3] remount: Fix failure for system-as-root
Subject: [PATCH 3/4] remount: Fix failure for system-as-root
Since commit 5ad7b3cbc5c1 ("Try to remount mounted points only"), the
system-as-root cannot be remounted successfully when execute command

View File

@ -0,0 +1,35 @@
From df349dcccc43dc45f4ff0ba8eb10c3f59f4f4f17 Mon Sep 17 00:00:00 2001
From: Peter Cai <peter@typeblog.net>
Date: Thu, 28 Apr 2022 21:22:30 -0400
Subject: [PATCH 4/4] fs_mgr: trigger the use of overlayfs earlier
At 1%, it's barely useable to do anything at all if remounted rw
---
fs_mgr/fs_mgr_overlayfs.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs_mgr/fs_mgr_overlayfs.cpp b/fs_mgr/fs_mgr_overlayfs.cpp
index 4d32bda80..ec6fef89a 100644
--- a/fs_mgr/fs_mgr_overlayfs.cpp
+++ b/fs_mgr/fs_mgr_overlayfs.cpp
@@ -176,7 +176,7 @@ bool fs_mgr_dir_is_writable(const std::string& path) {
return ret | !rmdir(test_directory.c_str());
}
-// At less than 1% or 8MB of free space return value of false,
+// At less than 20% or 8MB of free space return value of false,
// means we will try to wrap with overlayfs.
bool fs_mgr_filesystem_has_space(const std::string& mount_point) {
// If we have access issues to find out space remaining, return true
@@ -188,7 +188,7 @@ bool fs_mgr_filesystem_has_space(const std::string& mount_point) {
return true;
}
- static constexpr int kPercentThreshold = 1; // 1%
+ static constexpr int kPercentThreshold = 20; // 20%
static constexpr unsigned long kSizeThreshold = 8 * 1024 * 1024; // 8MB
return (vst.f_bfree >= (vst.f_blocks * kPercentThreshold / 100)) &&
--
2.36.0