Use sdcardfs for pass-through mounts.
The pass-through mount is used by MediaProvider to access external
storage. Previously, it was the raw filesystem (eg ext4/f2fs); the
problem with that is that the permissions on that filesystem don't allow
MediaProvider to access all the files it needs to - in particular
directories under Android/
To solve this problem, we can have the pass-through mount sit on top of
sdcardfs instead of the raw filesystem. This means we need to mount
sdcardfs even in case we're using FUSE, but we already needed to do this
anyway for other performance reasons.
Bug: 135341433
Test: atest AdoptableHostTest
Change-Id: I893d5e5076c5096d2d55212f643c9a857242e964
diff --git a/Utils.h b/Utils.h
index 375e175..5bb2855 100644
--- a/Utils.h
+++ b/Utils.h
@@ -154,7 +154,8 @@
status_t MountUserFuse(userid_t user_id, const std::string& absolute_lower_path,
const std::string& relative_upper_path, android::base::unique_fd* fuse_fd);
-status_t UnmountUserFuse(const std::string& pass_through_path, const std::string& fuse_path);
+status_t UnmountUserFuse(userid_t userId, const std::string& absolute_lower_path,
+ const std::string& relative_upper_path);
} // namespace vold
} // namespace android