From 27c731c706b3d547a6f8890859d16079cb53e1d9 Mon Sep 17 00:00:00 2001 From: Kelvin Zhang Date: Mon, 6 Feb 2023 12:20:53 -0800 Subject: Reduce logs in update_verifier update_verifier logs to kernel log, reduce unnecessary log lines to avoid throttling. Test: th Bug: 265715753 Change-Id: I57b5dcfbf04eebc62fdf96abf0c91d7df5e0f0ea --- update_verifier/update_verifier.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/update_verifier/update_verifier.cpp b/update_verifier/update_verifier.cpp index ea47a65ca..a0160e2fc 100644 --- a/update_verifier/update_verifier.cpp +++ b/update_verifier/update_verifier.cpp @@ -150,7 +150,6 @@ bool UpdateVerifier::ReadBlocks(const std::string partition_name, static constexpr size_t kBlockSize = 4096; std::vector buf(1024 * kBlockSize); - size_t block_count = 0; for (const auto& [range_start, range_end] : group) { if (lseek64(fd.get(), static_cast(range_start) * kBlockSize, SEEK_SET) == -1) { PLOG(ERROR) << "lseek to " << range_start << " failed"; @@ -166,9 +165,7 @@ bool UpdateVerifier::ReadBlocks(const std::string partition_name, } remain -= to_read; } - block_count += (range_end - range_start); } - LOG(INFO) << "Finished reading " << block_count << " blocks on " << dm_block_device; return true; }; @@ -179,8 +176,8 @@ bool UpdateVerifier::ReadBlocks(const std::string partition_name, for (auto& t : threads) { ret = t.get() && ret; } - LOG(INFO) << "Finished reading blocks on " << dm_block_device << " with " << thread_num - << " threads."; + LOG(INFO) << "Finished reading blocks on partition " << partition_name << " @ " << dm_block_device + << " with " << thread_num << " threads."; return ret; } -- cgit v1.2.3