[vold] pass along sysfs name in setOptions

Ignore-AOSP-First: Will cherry-pick to AOSP

BUG: 187308584
Test: atest CtsContentTestCases:android.content.pm.cts.PackageManagerShellCommandIncrementalTest#testInstallWithIdSigNoMissingPages
Change-Id: Iacfe6b735458051f2848b1b766c2b00198b397d9
This commit is contained in:
Songchun Fan 2021-05-10 16:19:38 -07:00
parent 0ae5274090
commit 0e53c1cdb0
3 changed files with 5 additions and 4 deletions

View file

@ -993,7 +993,7 @@ binder::Status VoldNativeService::unmountIncFs(const std::string& dir) {
binder::Status VoldNativeService::setIncFsMountOptions( binder::Status VoldNativeService::setIncFsMountOptions(
const ::android::os::incremental::IncrementalFileSystemControlParcel& control, const ::android::os::incremental::IncrementalFileSystemControlParcel& control,
bool enableReadLogs, bool enableReadTimeouts) { bool enableReadLogs, bool enableReadTimeouts, const std::string& sysfsName) {
ENFORCE_SYSTEM_OR_ROOT; ENFORCE_SYSTEM_OR_ROOT;
auto incfsControl = auto incfsControl =
@ -1010,7 +1010,8 @@ binder::Status VoldNativeService::setIncFsMountOptions(
incfsControl, incfsControl,
{.defaultReadTimeoutMs = {.defaultReadTimeoutMs =
enableReadTimeouts ? INCFS_DEFAULT_READ_TIMEOUT_MS : kIncFsReadNoTimeoutMs, enableReadTimeouts ? INCFS_DEFAULT_READ_TIMEOUT_MS : kIncFsReadNoTimeoutMs,
.readLogBufferPages = enableReadLogs ? INCFS_DEFAULT_PAGE_READ_BUFFER_PAGES : 0}); .readLogBufferPages = enableReadLogs ? INCFS_DEFAULT_PAGE_READ_BUFFER_PAGES : 0,
.sysfsName = sysfsName.c_str()});
error < 0) { error < 0) {
return binder::Status::fromServiceSpecificError(error); return binder::Status::fromServiceSpecificError(error);
} }

View file

@ -167,7 +167,7 @@ class VoldNativeService : public BinderService<VoldNativeService>, public os::Bn
binder::Status unmountIncFs(const std::string& dir) override; binder::Status unmountIncFs(const std::string& dir) override;
binder::Status setIncFsMountOptions( binder::Status setIncFsMountOptions(
const ::android::os::incremental::IncrementalFileSystemControlParcel& control, const ::android::os::incremental::IncrementalFileSystemControlParcel& control,
bool enableReadLogs, bool enableReadTimeouts) override; bool enableReadLogs, bool enableReadTimeouts, const std::string& sysfsName) override;
binder::Status bindMount(const std::string& sourceDir, const std::string& targetDir) override; binder::Status bindMount(const std::string& sourceDir, const std::string& targetDir) override;
binder::Status destroyDsuMetadataKey(const std::string& dsuSlot) override; binder::Status destroyDsuMetadataKey(const std::string& dsuSlot) override;

View file

@ -142,7 +142,7 @@ interface IVold {
boolean incFsEnabled(); boolean incFsEnabled();
IncrementalFileSystemControlParcel mountIncFs(@utf8InCpp String backingPath, @utf8InCpp String targetDir, int flags, @utf8InCpp String sysfsName); IncrementalFileSystemControlParcel mountIncFs(@utf8InCpp String backingPath, @utf8InCpp String targetDir, int flags, @utf8InCpp String sysfsName);
void unmountIncFs(@utf8InCpp String dir); void unmountIncFs(@utf8InCpp String dir);
void setIncFsMountOptions(in IncrementalFileSystemControlParcel control, boolean enableReadLogs, boolean enableReadTimeouts); void setIncFsMountOptions(in IncrementalFileSystemControlParcel control, boolean enableReadLogs, boolean enableReadTimeouts, @utf8InCpp String sysfsName);
void bindMount(@utf8InCpp String sourceDir, @utf8InCpp String targetDir); void bindMount(@utf8InCpp String sourceDir, @utf8InCpp String targetDir);
void destroyDsuMetadataKey(@utf8InCpp String dsuSlot); void destroyDsuMetadataKey(@utf8InCpp String dsuSlot);