From c542da26743a8fe42b7a91a19766e7f502388065 Mon Sep 17 00:00:00 2001 From: Daniel Zheng Date: Thu, 2 May 2024 11:36:22 -0700 Subject: [PATCH] libsnapshot: update write error logs We want to print how much total data we are attempting to write if a failure occurs Bug: 336461151 Test: th Change-Id: I269b7e280df34994c80fa8ef7d39163d053fa9ea --- fs_mgr/libsnapshot/libsnapshot_cow/writer_v3.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs_mgr/libsnapshot/libsnapshot_cow/writer_v3.cpp b/fs_mgr/libsnapshot/libsnapshot_cow/writer_v3.cpp index 95398e4b9..1117ec965 100644 --- a/fs_mgr/libsnapshot/libsnapshot_cow/writer_v3.cpp +++ b/fs_mgr/libsnapshot/libsnapshot_cow/writer_v3.cpp @@ -731,7 +731,8 @@ bool CowWriterV3::WriteOperation(std::span ops, i += chunk; } if (total_written != total_data_size) { - PLOG(ERROR) << "write failed for data of size: " << data.size() + PLOG(ERROR) << "write failed for data vector of size: " << data.size() + << " and total data length: " << total_data_size << " at offset: " << next_data_pos_ << " " << errno << ", only wrote: " << total_written; return false;