diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-07-07 05:23:20 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-07-07 05:23:20 +0000 |
commit | 91bd3da0060e2ea9c11aaf35ee57e2cd8a8b7737 (patch) | |
tree | 924be72429297471fba997e9202c69c046364af6 | |
parent | f21f53266a1bcaf64d28b09d2b7f09d7035db731 (diff) | |
parent | e094bef721948e46bda92d041fd5e9f4d6dbeafb (diff) | |
download | incremental_delivery-android14-mainline-uwb-release.tar.gz |
Snap for 10453563 from e094bef721948e46bda92d041fd5e9f4d6dbeafb to mainline-uwb-releaseaml_uwb_341513070aml_uwb_341511050aml_uwb_341310300aml_uwb_341310030aml_uwb_341111010aml_uwb_341011000android14-mainline-uwb-release
Change-Id: If4f455aa99c31f87646c4d82b74e3fcc9ec05a87
-rw-r--r-- | incfs/Android.bp | 2 | ||||
-rw-r--r-- | incfs/MountRegistry.cpp | 3 | ||||
-rw-r--r-- | incfs/incfs.cpp | 6 | ||||
-rw-r--r-- | incfs/include/incfs_inline.h | 2 | ||||
-rw-r--r-- | incfs/tests/util/map_ptr_test.cpp | 2 |
5 files changed, 9 insertions, 6 deletions
diff --git a/incfs/Android.bp b/incfs/Android.bp index e94cbd2..e179011 100644 --- a/incfs/Android.bp +++ b/incfs/Android.bp @@ -84,7 +84,7 @@ cc_defaults { target: { android: { static_libs: [ - "com.android.sysprop.incremental", + "libcom.android.sysprop.incremental", ], }, }, diff --git a/incfs/MountRegistry.cpp b/incfs/MountRegistry.cpp index 4f16f73..376eaf2 100644 --- a/incfs/MountRegistry.cpp +++ b/incfs/MountRegistry.cpp @@ -355,7 +355,8 @@ bool MountRegistry::Mounts::loadFrom(base::borrowed_fd fd, std::string_view file if (mount.backing.empty()) { mount.backing = std::move(backingDir); } else if (mount.backing != backingDir) { - LOG(WARNING) << "[incfs] root '" << *mount.roots.begin() + LOG(WARNING) << "[incfs] root '" + << (!mount.roots.empty() ? *mount.roots.begin() : "<unknown>") << "' mounted in multiple places with different backing dirs, '" << mount.backing << "' vs new '" << backingDir << "'; updating to the new one"; diff --git a/incfs/incfs.cpp b/incfs/incfs.cpp index e13cd81..29574c1 100644 --- a/incfs/incfs.cpp +++ b/incfs/incfs.cpp @@ -1611,7 +1611,8 @@ IncFsErrorCode IncFs_IsFullyLoadedByPath(const IncFsControl* control, const char } return isFullyLoadedV2(root, id); } - return isFullyLoadedSlow(openForSpecialOps(control->cmd, makeCommandPath(root, path).c_str())); + auto fd = ab::unique_fd(openForSpecialOps(control->cmd, makeCommandPath(root, path).c_str())); + return isFullyLoadedSlow(fd.get()); } IncFsErrorCode IncFs_IsFullyLoadedById(const IncFsControl* control, IncFsFileId fileId) { if (!control) { @@ -1624,9 +1625,10 @@ IncFsErrorCode IncFs_IsFullyLoadedById(const IncFsControl* control, IncFsFileId if (features() & Features::v2) { return isFullyLoadedV2(root, fileId); } - return isFullyLoadedSlow( + auto fd = ab::unique_fd( openForSpecialOps(control->cmd, makeCommandPath(root, indexPath(root, fileId)).c_str())); + return isFullyLoadedSlow(fd.get()); } static IncFsErrorCode isEverythingLoadedV2(const IncFsControl* control) { diff --git a/incfs/include/incfs_inline.h b/incfs/include/incfs_inline.h index f3d1e89..545a735 100644 --- a/incfs/include/incfs_inline.h +++ b/incfs/include/incfs_inline.h @@ -306,9 +306,9 @@ inline std::pair<ErrorCode, FilledRanges> getFilledRanges(int fd, } inline std::pair<ErrorCode, FilledRanges> getFilledRanges(int fd, FilledRanges&& resumeFrom) { + auto totalRanges = resumeFrom.dataRanges().size() + resumeFrom.hashRanges().size(); auto rawRanges = resumeFrom.internalRawRanges(); auto buffer = resumeFrom.extractInternalBufferAndClear(); - auto totalRanges = resumeFrom.dataRanges().size() + resumeFrom.hashRanges().size(); auto remainingSpace = buffer.size() - totalRanges; const bool loadAll = remainingSpace == 0; int res; diff --git a/incfs/tests/util/map_ptr_test.cpp b/incfs/tests/util/map_ptr_test.cpp index c78d91d..f9c96aa 100644 --- a/incfs/tests/util/map_ptr_test.cpp +++ b/incfs/tests/util/map_ptr_test.cpp @@ -325,4 +325,4 @@ TEST_F(MapPtrTest, GetDataAfterClose) { auto p1 = map->data().offset(missing_page_start).convert<uint32_t>(); ASSERT_FALSE(p1); ASSERT_SIGBUS(p1.value()); -}
\ No newline at end of file +} |