OSDN Git Service

[vold] pass sysfs_name to mount options
authorSongchun Fan <schfan@google.com>
Tue, 27 Apr 2021 19:46:02 +0000 (12:46 -0700)
committerSongchun Fan <schfan@google.com>
Thu, 29 Apr 2021 15:35:43 +0000 (08:35 -0700)
Ignore-AOSP-First: Will cherry-pick to AOSP

Test: manual
BUG: 184844615
Change-Id: I216210132f49f55098c0f2d1b8d4e571b22cfcc4

VoldNativeService.cpp
VoldNativeService.h
binder/android/os/IVold.aidl

index 66c7d46..8d63a83 100644 (file)
@@ -957,6 +957,7 @@ binder::Status VoldNativeService::incFsEnabled(bool* _aidl_return) {
 
 binder::Status VoldNativeService::mountIncFs(
         const std::string& backingPath, const std::string& targetDir, int32_t flags,
+        const std::string& sysfsName,
         ::android::os::incremental::IncrementalFileSystemControlParcel* _aidl_return) {
     ENFORCE_SYSTEM_OR_ROOT;
     CHECK_ARGUMENT_PATH(backingPath);
@@ -967,7 +968,8 @@ binder::Status VoldNativeService::mountIncFs(
                                  // Mount with read timeouts.
                                  .defaultReadTimeoutMs = INCFS_DEFAULT_READ_TIMEOUT_MS,
                                  // Mount with read logs disabled.
-                                 .readLogBufferPages = 0});
+                                 .readLogBufferPages = 0,
+                                 .sysfsName = sysfsName.c_str()});
     if (!control) {
         return translate(-errno);
     }
index c06e4b6..1414c38 100644 (file)
@@ -162,6 +162,7 @@ class VoldNativeService : public BinderService<VoldNativeService>, public os::Bn
     binder::Status incFsEnabled(bool* _aidl_return) override;
     binder::Status mountIncFs(
             const std::string& backingPath, const std::string& targetDir, int32_t flags,
+            const std::string& sysfsName,
             ::android::os::incremental::IncrementalFileSystemControlParcel* _aidl_return) override;
     binder::Status unmountIncFs(const std::string& dir) override;
     binder::Status setIncFsMountOptions(
index 6a69804..f20faca 100644 (file)
@@ -140,7 +140,7 @@ interface IVold {
     FileDescriptor openAppFuseFile(int uid, int mountId, int fileId, int flags);
 
     boolean incFsEnabled();
-    IncrementalFileSystemControlParcel mountIncFs(@utf8InCpp String backingPath, @utf8InCpp String targetDir, int flags);
+    IncrementalFileSystemControlParcel mountIncFs(@utf8InCpp String backingPath, @utf8InCpp String targetDir, int flags, @utf8InCpp String sysfsName);
     void unmountIncFs(@utf8InCpp String dir);
     void setIncFsMountOptions(in IncrementalFileSystemControlParcel control, boolean enableReadLogs, boolean enableReadTimeouts);
     void bindMount(@utf8InCpp String sourceDir, @utf8InCpp String targetDir);