Merge "snapuserd: Change error message to verbose" into main am: 664f16c830

Original change: https://android-review.googlesource.com/c/platform/system/core/+/3353119

Change-Id: Ib9e2e1230eda9a0fc1e74a36211ea338e9fcdcae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot 2024-11-15 19:58:50 +00:00 committed by Automerger Merge Worker
commit a11317c047
3 changed files with 5 additions and 4 deletions

View file

@ -582,7 +582,6 @@ bool MergeWorker::Run() {
pthread_setname_np(pthread_self(), "MergeWorker");
if (!snapuserd_->WaitForMergeBegin()) {
SNAP_LOG(ERROR) << "Merge terminated early...";
return true;
}
auto merge_thread_priority = android::base::GetUintProperty<uint32_t>(

View file

@ -702,7 +702,7 @@ bool ReadAhead::ReadAheadIOStart() {
// window. If there is a crash during this time frame, merge should resume
// based on the contents of the scratch space.
if (!snapuserd_->WaitForMergeReady()) {
SNAP_LOG(ERROR) << "ReadAhead failed to wait for merge ready";
SNAP_LOG(VERBOSE) << "ReadAhead failed to wait for merge ready";
return false;
}

View file

@ -202,7 +202,7 @@ bool SnapshotHandler::WaitForMergeBegin() {
cv.wait(lock, [this]() -> bool { return MergeInitiated() || IsMergeBeginError(io_state_); });
if (IsMergeBeginError(io_state_)) {
SNAP_LOG(ERROR) << "WaitForMergeBegin failed with state: " << io_state_;
SNAP_LOG(VERBOSE) << "WaitForMergeBegin failed with state: " << io_state_;
return false;
}
@ -276,7 +276,9 @@ bool SnapshotHandler::WaitForMergeReady() {
if (io_state_ == MERGE_IO_TRANSITION::MERGE_FAILED ||
io_state_ == MERGE_IO_TRANSITION::MERGE_COMPLETE ||
io_state_ == MERGE_IO_TRANSITION::IO_TERMINATED) {
SNAP_LOG(ERROR) << "Wait for merge ready failed: " << io_state_;
if (io_state_ == MERGE_IO_TRANSITION::MERGE_FAILED) {
SNAP_LOG(ERROR) << "Wait for merge ready failed: " << io_state_;
}
return false;
}
return true;