summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormailonghua <mailonghua@oppo.com>2020-12-04 16:26:48 +0800
committeralk3pInjection <webmaster@raspii.tech>2021-09-27 21:17:05 +0800
commit7b90caf1281021675097416dab9b30baae2f857a (patch)
tree47d692bcf977d9f1f5e599e1aa8569f851534e9d
parent8118fddc10eef88813b20f39a6a4826f324af1c5 (diff)
apexd: fallback to buffered IO on overlayfs
Even though we have used buffered IO on squashfs and erofs, apexd will still fail to loop mount after adb remount. So we should allow to use buffered IO on overlayfs. Bug:174816929 Test: Boot with erofs or squashfs images after adb remount Signed-off-by: Huang Jianan <huangjianan@oppo.com> Change-Id: I2ad68bb7b1c9d9ff241a496120602ff5558c34e0
-rw-r--r--apexd/apexd_loop.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/apexd/apexd_loop.cpp b/apexd/apexd_loop.cpp
index 62e3d56..2e5bd04 100644
--- a/apexd/apexd_loop.cpp
+++ b/apexd/apexd_loop.cpp
@@ -176,7 +176,8 @@ Result<void> configureLoopDevice(const int device_fd, const std::string& target,
// let's give another try with buffered I/O for EROFS and squashfs
if (statfs(target.c_str(), &stbuf) != 0 ||
(stbuf.f_type != EROFS_SUPER_MAGIC_V1 &&
- stbuf.f_type != SQUASHFS_MAGIC)) {
+ stbuf.f_type != SQUASHFS_MAGIC &&
+ stbuf.f_type != OVERLAYFS_SUPER_MAGIC)) {
return Error(saved_errno) << "Failed to open " << target;
}
LOG(WARNING) << "Fallback to buffered I/O for " << target;