From 11165b1de3b355cb9d4ec077a00bc97844f8fe7e Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Thu, 10 Dec 2020 16:13:23 -0500 Subject: [PATCH] librbd/mirror: increase debug logging of snapshot state machines Try to keep debug level 20 for IO state machines so that setting the debug level to something lower should show the manipulation of the mirror snapshots. Signed-off-by: Jason Dillaman --- .../snapshot/CreateNonPrimaryRequest.cc | 22 +++++------ .../mirror/snapshot/CreatePrimaryRequest.cc | 20 +++++----- src/librbd/mirror/snapshot/DemoteRequest.cc | 6 +-- .../mirror/snapshot/GetImageStateRequest.cc | 6 +-- src/librbd/mirror/snapshot/PromoteRequest.cc | 38 +++++++++---------- .../snapshot/RemoveImageStateRequest.cc | 10 ++--- .../mirror/snapshot/SetImageStateRequest.cc | 20 +++++----- .../mirror/snapshot/UnlinkPeerRequest.cc | 26 ++++++------- .../mirror/snapshot/WriteImageStateRequest.cc | 6 +-- 9 files changed, 77 insertions(+), 77 deletions(-) diff --git a/src/librbd/mirror/snapshot/CreateNonPrimaryRequest.cc b/src/librbd/mirror/snapshot/CreateNonPrimaryRequest.cc index ee6b93ec2cb..eed0aa506a3 100644 --- a/src/librbd/mirror/snapshot/CreateNonPrimaryRequest.cc +++ b/src/librbd/mirror/snapshot/CreateNonPrimaryRequest.cc @@ -51,7 +51,7 @@ void CreateNonPrimaryRequest::refresh_image() { } CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << dendl; + ldout(cct, 15) << dendl; auto ctx = create_context_callback< CreateNonPrimaryRequest, @@ -62,7 +62,7 @@ void CreateNonPrimaryRequest::refresh_image() { template void CreateNonPrimaryRequest::handle_refresh_image(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; if (r < 0) { lderr(cct) << "failed to refresh image: " << cpp_strerror(r) << dendl; @@ -76,7 +76,7 @@ void CreateNonPrimaryRequest::handle_refresh_image(int r) { template void CreateNonPrimaryRequest::get_mirror_image() { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << dendl; + ldout(cct, 15) << dendl; librados::ObjectReadOperation op; cls_client::mirror_image_get_start(&op, m_image_ctx->id); @@ -92,7 +92,7 @@ void CreateNonPrimaryRequest::get_mirror_image() { template void CreateNonPrimaryRequest::handle_get_mirror_image(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; cls::rbd::MirrorImage mirror_image; if (r == 0) { @@ -134,7 +134,7 @@ void CreateNonPrimaryRequest::get_mirror_peers() { } CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << dendl; + ldout(cct, 15) << dendl; librados::ObjectReadOperation op; cls_client::mirror_peer_list_start(&op); @@ -151,7 +151,7 @@ void CreateNonPrimaryRequest::get_mirror_peers() { template void CreateNonPrimaryRequest::handle_get_mirror_peers(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; std::vector peers; if (r == 0) { @@ -189,7 +189,7 @@ void CreateNonPrimaryRequest::create_snapshot() { } ns.snap_seqs = m_snap_seqs; ns.complete = is_orphan(); - ldout(cct, 20) << "ns=" << ns << dendl; + ldout(cct, 15) << "ns=" << ns << dendl; auto ctx = create_context_callback< CreateNonPrimaryRequest, @@ -200,7 +200,7 @@ void CreateNonPrimaryRequest::create_snapshot() { template void CreateNonPrimaryRequest::handle_create_snapshot(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; if (r < 0) { lderr(cct) << "failed to create mirror snapshot: " << cpp_strerror(r) @@ -231,7 +231,7 @@ void CreateNonPrimaryRequest::write_image_state() { } CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << dendl; + ldout(cct, 15) << dendl; auto ctx = create_context_callback< CreateNonPrimaryRequest, @@ -245,7 +245,7 @@ void CreateNonPrimaryRequest::write_image_state() { template void CreateNonPrimaryRequest::handle_write_image_state(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; if (r < 0) { lderr(cct) << "failed to write image state: " << cpp_strerror(r) @@ -260,7 +260,7 @@ void CreateNonPrimaryRequest::handle_write_image_state(int r) { template void CreateNonPrimaryRequest::finish(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; m_on_finish->complete(r); delete this; diff --git a/src/librbd/mirror/snapshot/CreatePrimaryRequest.cc b/src/librbd/mirror/snapshot/CreatePrimaryRequest.cc index 36961d35e84..70962cc6efb 100644 --- a/src/librbd/mirror/snapshot/CreatePrimaryRequest.cc +++ b/src/librbd/mirror/snapshot/CreatePrimaryRequest.cc @@ -59,7 +59,7 @@ void CreatePrimaryRequest::send() { template void CreatePrimaryRequest::get_mirror_peers() { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << dendl; + ldout(cct, 15) << dendl; librados::ObjectReadOperation op; cls_client::mirror_peer_list_start(&op); @@ -76,7 +76,7 @@ void CreatePrimaryRequest::get_mirror_peers() { template void CreatePrimaryRequest::handle_get_mirror_peers(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; std::vector peers; if (r == 0) { @@ -117,7 +117,7 @@ void CreatePrimaryRequest::create_snapshot() { m_mirror_peer_uuids, "", m_clean_since_snap_id}; CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "name=" << m_snap_name << ", " + ldout(cct, 15) << "name=" << m_snap_name << ", " << "ns=" << ns << dendl; auto ctx = create_context_callback< CreatePrimaryRequest, @@ -129,7 +129,7 @@ void CreatePrimaryRequest::create_snapshot() { template void CreatePrimaryRequest::handle_create_snapshot(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; if (r < 0) { lderr(cct) << "failed to create mirror snapshot: " << cpp_strerror(r) @@ -151,7 +151,7 @@ void CreatePrimaryRequest::refresh_image() { } CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << dendl; + ldout(cct, 15) << dendl; auto ctx = create_context_callback< CreatePrimaryRequest, @@ -162,7 +162,7 @@ void CreatePrimaryRequest::refresh_image() { template void CreatePrimaryRequest::handle_refresh_image(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; if (r < 0) { lderr(cct) << "failed to refresh image: " << cpp_strerror(r) << dendl; @@ -174,7 +174,7 @@ void CreatePrimaryRequest::handle_refresh_image(int r) { std::shared_lock image_locker{m_image_ctx->image_lock}; *m_snap_id = m_image_ctx->get_snap_id( cls::rbd::MirrorSnapshotNamespace{}, m_snap_name); - ldout(cct, 20) << "snap_id=" << *m_snap_id << dendl; + ldout(cct, 15) << "snap_id=" << *m_snap_id << dendl; } unlink_peer(); @@ -225,7 +225,7 @@ void CreatePrimaryRequest::unlink_peer() { } CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "peer=" << peer_uuid << ", snap_id=" << snap_id << dendl; + ldout(cct, 15) << "peer=" << peer_uuid << ", snap_id=" << snap_id << dendl; auto ctx = create_context_callback< CreatePrimaryRequest, @@ -237,7 +237,7 @@ void CreatePrimaryRequest::unlink_peer() { template void CreatePrimaryRequest::handle_unlink_peer(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; if (r < 0) { lderr(cct) << "failed to unlink peer: " << cpp_strerror(r) << dendl; @@ -251,7 +251,7 @@ void CreatePrimaryRequest::handle_unlink_peer(int r) { template void CreatePrimaryRequest::finish(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; m_on_finish->complete(r); delete this; diff --git a/src/librbd/mirror/snapshot/DemoteRequest.cc b/src/librbd/mirror/snapshot/DemoteRequest.cc index f9c14ea8a2b..ccaa33c8349 100644 --- a/src/librbd/mirror/snapshot/DemoteRequest.cc +++ b/src/librbd/mirror/snapshot/DemoteRequest.cc @@ -66,7 +66,7 @@ void DemoteRequest::handle_enable_non_primary_feature(int r) { template void DemoteRequest::create_snapshot() { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << dendl; + ldout(cct, 15) << dendl; auto ctx = create_context_callback< DemoteRequest, &DemoteRequest::handle_create_snapshot>(this); @@ -82,7 +82,7 @@ void DemoteRequest::create_snapshot() { template void DemoteRequest::handle_create_snapshot(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; if (r < 0) { lderr(cct) << "failed to create mirror snapshot: " << cpp_strerror(r) @@ -97,7 +97,7 @@ void DemoteRequest::handle_create_snapshot(int r) { template void DemoteRequest::finish(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; m_on_finish->complete(r); delete this; diff --git a/src/librbd/mirror/snapshot/GetImageStateRequest.cc b/src/librbd/mirror/snapshot/GetImageStateRequest.cc index e7db57bfc59..4692f88cb80 100644 --- a/src/librbd/mirror/snapshot/GetImageStateRequest.cc +++ b/src/librbd/mirror/snapshot/GetImageStateRequest.cc @@ -33,7 +33,7 @@ void GetImageStateRequest::read_object() { auto oid = util::image_state_object_name(m_image_ctx, m_snap_id, m_object_index); - ldout(cct, 20) << oid << dendl; + ldout(cct, 15) << oid << dendl; librados::ObjectReadOperation op; m_bl.clear(); @@ -50,7 +50,7 @@ void GetImageStateRequest::read_object() { template void GetImageStateRequest::handle_read_object(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; if (r < 0) { lderr(cct) << "failed to read image state object: " << cpp_strerror(r) @@ -91,7 +91,7 @@ void GetImageStateRequest::handle_read_object(int r) { template void GetImageStateRequest::finish(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; if (r == 0) { try { diff --git a/src/librbd/mirror/snapshot/PromoteRequest.cc b/src/librbd/mirror/snapshot/PromoteRequest.cc index f80db3ada77..9718c299e03 100644 --- a/src/librbd/mirror/snapshot/PromoteRequest.cc +++ b/src/librbd/mirror/snapshot/PromoteRequest.cc @@ -45,7 +45,7 @@ void PromoteRequest::send() { return; } - ldout(cct, 20) << "requires_orphan=" << requires_orphan << ", " + ldout(cct, 15) << "requires_orphan=" << requires_orphan << ", " << "rollback_snap_id=" << m_rollback_snap_id << dendl; create_orphan_snapshot(); } @@ -53,7 +53,7 @@ void PromoteRequest::send() { template void PromoteRequest::create_orphan_snapshot() { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << dendl; + ldout(cct, 15) << dendl; auto ctx = create_context_callback< PromoteRequest, @@ -67,7 +67,7 @@ void PromoteRequest::create_orphan_snapshot() { template void PromoteRequest::handle_create_orphan_snapshot(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; if (r < 0) { lderr(cct) << "failed to create orphan snapshot: " << cpp_strerror(r) @@ -82,7 +82,7 @@ void PromoteRequest::handle_create_orphan_snapshot(int r) { template void PromoteRequest::list_watchers() { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << dendl; + ldout(cct, 15) << dendl; auto ctx = create_context_callback< PromoteRequest, @@ -99,7 +99,7 @@ void PromoteRequest::list_watchers() { template void PromoteRequest::handle_list_watchers(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; if (r < 0) { lderr(cct) << "failed to list watchers: " << cpp_strerror(r) @@ -119,7 +119,7 @@ void PromoteRequest::handle_list_watchers(int r) { template void PromoteRequest::wait_update_notify() { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << dendl; + ldout(cct, 15) << dendl; ImageCtx::get_timer_instance(cct, &m_timer, &m_timer_lock); @@ -142,7 +142,7 @@ void PromoteRequest::wait_update_notify() { template void PromoteRequest::handle_update_notify() { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << dendl; + ldout(cct, 15) << dendl; std::lock_guard timer_lock{*m_timer_lock}; m_scheduler_ticks = 0; @@ -153,7 +153,7 @@ void PromoteRequest::scheduler_unregister_update_watcher() { ceph_assert(ceph_mutex_is_locked(*m_timer_lock)); CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "scheduler_ticks=" << m_scheduler_ticks << dendl; + ldout(cct, 15) << "scheduler_ticks=" << m_scheduler_ticks << dendl; if (m_scheduler_ticks > 0) { m_scheduler_ticks--; @@ -171,7 +171,7 @@ void PromoteRequest::scheduler_unregister_update_watcher() { template void PromoteRequest::unregister_update_watcher() { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << dendl; + ldout(cct, 15) << dendl; auto ctx = create_context_callback< PromoteRequest, @@ -183,7 +183,7 @@ void PromoteRequest::unregister_update_watcher() { template void PromoteRequest::handle_unregister_update_watcher(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; if (r < 0) { lderr(cct) << "failed to unregister update watcher: " << cpp_strerror(r) @@ -202,7 +202,7 @@ void PromoteRequest::acquire_exclusive_lock() { if (m_image_ctx->exclusive_lock != nullptr && !m_image_ctx->exclusive_lock->is_lock_owner()) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << dendl; + ldout(cct, 15) << dendl; m_lock_acquired = true; m_image_ctx->exclusive_lock->block_requests(0); @@ -222,7 +222,7 @@ void PromoteRequest::acquire_exclusive_lock() { template void PromoteRequest::handle_acquire_exclusive_lock(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; if (r < 0) { lderr(cct) << "failed to acquire exclusive lock: " << cpp_strerror(r) @@ -252,7 +252,7 @@ void PromoteRequest::rollback() { } CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << dendl; + ldout(cct, 15) << dendl; std::shared_lock owner_locker{m_image_ctx->owner_lock}; std::shared_lock image_locker{m_image_ctx->image_lock}; @@ -275,7 +275,7 @@ void PromoteRequest::rollback() { template void PromoteRequest::handle_rollback(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; if (r < 0) { lderr(cct) << "failed to rollback: " << cpp_strerror(r) << dendl; @@ -289,7 +289,7 @@ void PromoteRequest::handle_rollback(int r) { template void PromoteRequest::create_promote_snapshot() { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << dendl; + ldout(cct, 15) << dendl; auto ctx = create_context_callback< PromoteRequest, @@ -306,7 +306,7 @@ void PromoteRequest::create_promote_snapshot() { template void PromoteRequest::handle_create_promote_snapshot(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; if (r < 0) { lderr(cct) << "failed to create promote snapshot: " << cpp_strerror(r) @@ -358,7 +358,7 @@ void PromoteRequest::release_exclusive_lock() { std::unique_lock locker{m_image_ctx->owner_lock}; if (m_image_ctx->exclusive_lock != nullptr) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << dendl; + ldout(cct, 15) << dendl; m_image_ctx->exclusive_lock->unblock_requests(); @@ -377,7 +377,7 @@ void PromoteRequest::release_exclusive_lock() { template void PromoteRequest::handle_release_exclusive_lock(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; if (r < 0) { lderr(cct) << "failed to release exclusive lock: " << cpp_strerror(r) @@ -392,7 +392,7 @@ void PromoteRequest::handle_release_exclusive_lock(int r) { template void PromoteRequest::finish(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; m_on_finish->complete(r); delete this; diff --git a/src/librbd/mirror/snapshot/RemoveImageStateRequest.cc b/src/librbd/mirror/snapshot/RemoveImageStateRequest.cc index 05920c26f51..204e0489adf 100644 --- a/src/librbd/mirror/snapshot/RemoveImageStateRequest.cc +++ b/src/librbd/mirror/snapshot/RemoveImageStateRequest.cc @@ -32,7 +32,7 @@ void RemoveImageStateRequest::get_object_count() { CephContext *cct = m_image_ctx->cct; auto oid = util::image_state_object_name(m_image_ctx, m_snap_id, 0); - ldout(cct, 20) << oid << dendl; + ldout(cct, 15) << oid << dendl; librados::ObjectReadOperation op; op.read(0, 0, &m_bl, nullptr); @@ -48,7 +48,7 @@ void RemoveImageStateRequest::get_object_count() { template void RemoveImageStateRequest::handle_get_object_count(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; if (r < 0) { lderr(cct) << "failed to read image state object: " << cpp_strerror(r) @@ -82,7 +82,7 @@ void RemoveImageStateRequest::remove_object() { auto oid = util::image_state_object_name(m_image_ctx, m_snap_id, m_object_count); - ldout(cct, 20) << oid << dendl; + ldout(cct, 15) << oid << dendl; librados::ObjectWriteOperation op; op.remove(); @@ -98,7 +98,7 @@ void RemoveImageStateRequest::remove_object() { template void RemoveImageStateRequest::handle_remove_object(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; if (r < 0 && r != -ENOENT) { lderr(cct) << "failed to remove image state object: " << cpp_strerror(r) @@ -118,7 +118,7 @@ void RemoveImageStateRequest::handle_remove_object(int r) { template void RemoveImageStateRequest::finish(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; m_on_finish->complete(r); delete this; diff --git a/src/librbd/mirror/snapshot/SetImageStateRequest.cc b/src/librbd/mirror/snapshot/SetImageStateRequest.cc index d0caccdf58a..f68bff8b92c 100644 --- a/src/librbd/mirror/snapshot/SetImageStateRequest.cc +++ b/src/librbd/mirror/snapshot/SetImageStateRequest.cc @@ -33,7 +33,7 @@ void SetImageStateRequest::send() { template void SetImageStateRequest::get_snap_limit() { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << dendl; + ldout(cct, 15) << dendl; librados::ObjectReadOperation op; cls_client::snapshot_get_limit_start(&op); @@ -51,7 +51,7 @@ void SetImageStateRequest::get_snap_limit() { template void SetImageStateRequest::handle_get_snap_limit(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; if (r == 0) { auto it = m_bl.cbegin(); @@ -65,7 +65,7 @@ void SetImageStateRequest::handle_get_snap_limit(int r) { return; } - ldout(cct, 20) << "snap_limit=" << m_image_state.snap_limit << dendl; + ldout(cct, 15) << "snap_limit=" << m_image_state.snap_limit << dendl; get_metadata(); } @@ -73,7 +73,7 @@ void SetImageStateRequest::handle_get_snap_limit(int r) { template void SetImageStateRequest::get_metadata() { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << dendl; + ldout(cct, 15) << dendl; auto ctx = create_context_callback< SetImageStateRequest, @@ -87,7 +87,7 @@ void SetImageStateRequest::get_metadata() { template void SetImageStateRequest::handle_get_metadata(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; if (r < 0) { lderr(cct) << "failed to retrieve metadata: " << cpp_strerror(r) @@ -122,7 +122,7 @@ void SetImageStateRequest::handle_get_metadata(int r) { template void SetImageStateRequest::write_image_state() { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << dendl; + ldout(cct, 15) << dendl; auto ctx = create_context_callback< SetImageStateRequest, @@ -136,7 +136,7 @@ void SetImageStateRequest::write_image_state() { template void SetImageStateRequest::handle_write_image_state(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; if (r < 0) { lderr(cct) << "failed to write image state: " << cpp_strerror(r) @@ -151,7 +151,7 @@ void SetImageStateRequest::handle_write_image_state(int r) { template void SetImageStateRequest::update_primary_snapshot() { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << dendl; + ldout(cct, 15) << dendl; librados::ObjectWriteOperation op; librbd::cls_client::mirror_image_snapshot_set_copy_progress( @@ -169,7 +169,7 @@ void SetImageStateRequest::update_primary_snapshot() { template void SetImageStateRequest::handle_update_primary_snapshot(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; if (r < 0) { lderr(cct) << "failed to update primary snapshot: " << cpp_strerror(r) @@ -184,7 +184,7 @@ void SetImageStateRequest::handle_update_primary_snapshot(int r) { template void SetImageStateRequest::finish(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; m_on_finish->complete(r); delete this; diff --git a/src/librbd/mirror/snapshot/UnlinkPeerRequest.cc b/src/librbd/mirror/snapshot/UnlinkPeerRequest.cc index d82d42d5bad..2c89d251392 100644 --- a/src/librbd/mirror/snapshot/UnlinkPeerRequest.cc +++ b/src/librbd/mirror/snapshot/UnlinkPeerRequest.cc @@ -35,7 +35,7 @@ void UnlinkPeerRequest::send() { template void UnlinkPeerRequest::refresh_image() { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << dendl; + ldout(cct, 15) << dendl; auto ctx = create_context_callback< UnlinkPeerRequest, &UnlinkPeerRequest::handle_refresh_image>(this); @@ -45,7 +45,7 @@ void UnlinkPeerRequest::refresh_image() { template void UnlinkPeerRequest::handle_refresh_image(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; if (r < 0) { lderr(cct) << "failed to refresh image: " << cpp_strerror(r) << dendl; @@ -72,14 +72,14 @@ void UnlinkPeerRequest::unlink_peer() { &snap_it->second.snap_namespace); } else if (boost::get( &snap_it->second.snap_namespace) != nullptr) { - ldout(cct, 20) << "located newer mirror snapshot" << dendl; + ldout(cct, 15) << "located newer mirror snapshot" << dendl; m_newer_mirror_snapshots = true; break; } } if (r == -ENOENT) { - ldout(cct, 20) << "missing snapshot: snap_id=" << m_snap_id << dendl; + ldout(cct, 15) << "missing snapshot: snap_id=" << m_snap_id << dendl; m_image_ctx->image_lock.unlock_shared(); finish(r); return; @@ -102,7 +102,7 @@ void UnlinkPeerRequest::unlink_peer() { } m_image_ctx->image_lock.unlock_shared(); - ldout(cct, 20) << "snap_id=" << m_snap_id << ", " + ldout(cct, 15) << "snap_id=" << m_snap_id << ", " << "mirror_peer_uuid=" << m_mirror_peer_uuid << dendl; librados::ObjectWriteOperation op; librbd::cls_client::mirror_image_snapshot_unlink_peer(&op, m_snap_id, @@ -117,7 +117,7 @@ void UnlinkPeerRequest::unlink_peer() { template void UnlinkPeerRequest::handle_unlink_peer(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; if (r == -ERESTART || r == -ENOENT) { refresh_image(); @@ -136,7 +136,7 @@ void UnlinkPeerRequest::handle_unlink_peer(int r) { template void UnlinkPeerRequest::notify_update() { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << dendl; + ldout(cct, 15) << dendl; auto ctx = create_context_callback< UnlinkPeerRequest, &UnlinkPeerRequest::handle_notify_update>(this); @@ -146,7 +146,7 @@ void UnlinkPeerRequest::notify_update() { template void UnlinkPeerRequest::handle_notify_update(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; if (r < 0 && r != -ENOENT) { lderr(cct) << "failed to notify update: " << cpp_strerror(r) << dendl; @@ -160,7 +160,7 @@ void UnlinkPeerRequest::handle_notify_update(int r) { template void UnlinkPeerRequest::remove_snapshot() { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << dendl; + ldout(cct, 15) << dendl; cls::rbd::SnapshotNamespace snap_namespace; std::string snap_name; @@ -178,7 +178,7 @@ void UnlinkPeerRequest::remove_snapshot() { } if (r == -ENOENT) { - ldout(cct, 20) << "failed to locate snapshot " << m_snap_id << dendl; + ldout(cct, 15) << "failed to locate snapshot " << m_snap_id << dendl; finish(0); return; } @@ -188,7 +188,7 @@ void UnlinkPeerRequest::remove_snapshot() { info.mirror_peer_uuids.erase(m_mirror_peer_uuid); if (!info.mirror_peer_uuids.empty() || !m_newer_mirror_snapshots) { - ldout(cct, 20) << "skipping removal of snapshot: " + ldout(cct, 15) << "skipping removal of snapshot: " << "snap_id=" << m_snap_id << ": " << "mirror_peer_uuid=" << m_mirror_peer_uuid << ", " << "mirror_peer_uuids=" << info.mirror_peer_uuids << dendl; @@ -204,7 +204,7 @@ void UnlinkPeerRequest::remove_snapshot() { template void UnlinkPeerRequest::handle_remove_snapshot(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; if (r < 0 && r != -ENOENT) { lderr(cct) << "failed to remove snapshot: " << cpp_strerror(r) << dendl; @@ -218,7 +218,7 @@ void UnlinkPeerRequest::handle_remove_snapshot(int r) { template void UnlinkPeerRequest::finish(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; auto on_finish = m_on_finish; delete this; diff --git a/src/librbd/mirror/snapshot/WriteImageStateRequest.cc b/src/librbd/mirror/snapshot/WriteImageStateRequest.cc index c179b9f021d..c79dd7e2ce6 100644 --- a/src/librbd/mirror/snapshot/WriteImageStateRequest.cc +++ b/src/librbd/mirror/snapshot/WriteImageStateRequest.cc @@ -66,7 +66,7 @@ void WriteImageStateRequest::write_object() { auto oid = util::image_state_object_name(m_image_ctx, m_snap_id, m_object_count); - ldout(cct, 20) << oid << dendl; + ldout(cct, 15) << oid << dendl; size_t off = m_object_count * m_object_size; size_t len = std::min(m_bl.length() - off, m_object_size); @@ -87,7 +87,7 @@ void WriteImageStateRequest::write_object() { template void WriteImageStateRequest::handle_write_object(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; if (r < 0) { lderr(cct) << "failed to write object: " << cpp_strerror(r) @@ -107,7 +107,7 @@ void WriteImageStateRequest::handle_write_object(int r) { template void WriteImageStateRequest::finish(int r) { CephContext *cct = m_image_ctx->cct; - ldout(cct, 20) << "r=" << r << dendl; + ldout(cct, 15) << "r=" << r << dendl; m_on_finish->complete(r); delete this;