diff options
author | Alex Buynytskyy <alexbuy@google.com> | 2020-05-12 11:24:14 -0700 |
---|---|---|
committer | Alex Buynytskyy <alexbuy@google.com> | 2020-05-12 13:49:29 -0700 |
commit | 4dbc0607ee43d3b0eab5e115531c639ff1a1f339 (patch) | |
tree | f3e3f7f0568ed34097022b1700d0650b00494ee7 /services/incremental/IncrementalService.cpp | |
parent | 5d1cb4fe1ed9c7834421401e124893994d859db0 (diff) |
Don't try to recreate IncrementalFileStorages on re-commit.
Bug: 156287164
Fixes 156287164
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest
Change-Id: I75e392a1fa84df8b6ac0b855233f9a2662998e96
Diffstat (limited to 'services/incremental/IncrementalService.cpp')
-rw-r--r-- | services/incremental/IncrementalService.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/services/incremental/IncrementalService.cpp b/services/incremental/IncrementalService.cpp index a9dc92fca971..78439dba2724 100644 --- a/services/incremental/IncrementalService.cpp +++ b/services/incremental/IncrementalService.cpp @@ -748,7 +748,7 @@ int IncrementalService::unbind(StorageId storage, std::string_view target) { return -EINVAL; } - LOG(INFO) << "Removing bind point " << target; + LOG(INFO) << "Removing bind point " << target << " for storage " << storage; // Here we should only look up by the exact target, not by a subdirectory of any existing mount, // otherwise there's a chance to unmount something completely unrelated @@ -1807,6 +1807,8 @@ bool IncrementalService::DataLoaderStub::fsmStep() { targetStatus = mTargetStatus; } + LOG(DEBUG) << "fsmStep: " << mId << ": " << currentStatus << " -> " << targetStatus; + if (currentStatus == targetStatus) { return true; } @@ -1868,8 +1870,8 @@ binder::Status IncrementalService::DataLoaderStub::onStatusChanged(MountId mount listener = mListener; if (mCurrentStatus == IDataLoaderStatusListener::DATA_LOADER_UNAVAILABLE) { - // For unavailable, reset target status. - setTargetStatusLocked(IDataLoaderStatusListener::DATA_LOADER_UNAVAILABLE); + // For unavailable, unbind from DataLoader to ensure proper re-commit. + setTargetStatusLocked(IDataLoaderStatusListener::DATA_LOADER_DESTROYED); } } |