Merge "Reduce logs in update_verifier" am: f891951d07 am: 365c8c0b54

Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/2423949

Change-Id: Ifc7d73d357850874ce2aa296e3716a11c9f08f0f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot 2023-02-07 00:26:17 +00:00 committed by Automerger Merge Worker
commit c7eb36f1b7

View file

@ -150,7 +150,6 @@ bool UpdateVerifier::ReadBlocks(const std::string partition_name,
static constexpr size_t kBlockSize = 4096; static constexpr size_t kBlockSize = 4096;
std::vector<uint8_t> buf(1024 * kBlockSize); std::vector<uint8_t> buf(1024 * kBlockSize);
size_t block_count = 0;
for (const auto& [range_start, range_end] : group) { for (const auto& [range_start, range_end] : group) {
if (lseek64(fd.get(), static_cast<off64_t>(range_start) * kBlockSize, SEEK_SET) == -1) { if (lseek64(fd.get(), static_cast<off64_t>(range_start) * kBlockSize, SEEK_SET) == -1) {
PLOG(ERROR) << "lseek to " << range_start << " failed"; PLOG(ERROR) << "lseek to " << range_start << " failed";
@ -166,9 +165,7 @@ bool UpdateVerifier::ReadBlocks(const std::string partition_name,
} }
remain -= to_read; remain -= to_read;
} }
block_count += (range_end - range_start);
} }
LOG(INFO) << "Finished reading " << block_count << " blocks on " << dm_block_device;
return true; return true;
}; };
@ -179,8 +176,8 @@ bool UpdateVerifier::ReadBlocks(const std::string partition_name,
for (auto& t : threads) { for (auto& t : threads) {
ret = t.get() && ret; ret = t.get() && ret;
} }
LOG(INFO) << "Finished reading blocks on " << dm_block_device << " with " << thread_num LOG(INFO) << "Finished reading blocks on partition " << partition_name << " @ " << dm_block_device
<< " threads."; << " with " << thread_num << " threads.";
return ret; return ret;
} }