mirror of
https://github.com/ceph/ceph
synced 2025-02-24 11:37:37 +00:00
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 <dillaman@redhat.com>
This commit is contained in:
parent
cbbfd1c426
commit
11165b1de3
@ -51,7 +51,7 @@ void CreateNonPrimaryRequest<I>::refresh_image() {
|
||||
}
|
||||
|
||||
CephContext *cct = m_image_ctx->cct;
|
||||
ldout(cct, 20) << dendl;
|
||||
ldout(cct, 15) << dendl;
|
||||
|
||||
auto ctx = create_context_callback<
|
||||
CreateNonPrimaryRequest<I>,
|
||||
@ -62,7 +62,7 @@ void CreateNonPrimaryRequest<I>::refresh_image() {
|
||||
template <typename I>
|
||||
void CreateNonPrimaryRequest<I>::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<I>::handle_refresh_image(int r) {
|
||||
template <typename I>
|
||||
void CreateNonPrimaryRequest<I>::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<I>::get_mirror_image() {
|
||||
template <typename I>
|
||||
void CreateNonPrimaryRequest<I>::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<I>::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<I>::get_mirror_peers() {
|
||||
template <typename I>
|
||||
void CreateNonPrimaryRequest<I>::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<cls::rbd::MirrorPeer> peers;
|
||||
if (r == 0) {
|
||||
@ -189,7 +189,7 @@ void CreateNonPrimaryRequest<I>::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<I>,
|
||||
@ -200,7 +200,7 @@ void CreateNonPrimaryRequest<I>::create_snapshot() {
|
||||
template <typename I>
|
||||
void CreateNonPrimaryRequest<I>::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<I>::write_image_state() {
|
||||
}
|
||||
|
||||
CephContext *cct = m_image_ctx->cct;
|
||||
ldout(cct, 20) << dendl;
|
||||
ldout(cct, 15) << dendl;
|
||||
|
||||
auto ctx = create_context_callback<
|
||||
CreateNonPrimaryRequest<I>,
|
||||
@ -245,7 +245,7 @@ void CreateNonPrimaryRequest<I>::write_image_state() {
|
||||
template <typename I>
|
||||
void CreateNonPrimaryRequest<I>::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<I>::handle_write_image_state(int r) {
|
||||
template <typename I>
|
||||
void CreateNonPrimaryRequest<I>::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;
|
||||
|
@ -59,7 +59,7 @@ void CreatePrimaryRequest<I>::send() {
|
||||
template <typename I>
|
||||
void CreatePrimaryRequest<I>::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<I>::get_mirror_peers() {
|
||||
template <typename I>
|
||||
void CreatePrimaryRequest<I>::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<cls::rbd::MirrorPeer> peers;
|
||||
if (r == 0) {
|
||||
@ -117,7 +117,7 @@ void CreatePrimaryRequest<I>::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<I>,
|
||||
@ -129,7 +129,7 @@ void CreatePrimaryRequest<I>::create_snapshot() {
|
||||
template <typename I>
|
||||
void CreatePrimaryRequest<I>::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<I>::refresh_image() {
|
||||
}
|
||||
|
||||
CephContext *cct = m_image_ctx->cct;
|
||||
ldout(cct, 20) << dendl;
|
||||
ldout(cct, 15) << dendl;
|
||||
|
||||
auto ctx = create_context_callback<
|
||||
CreatePrimaryRequest<I>,
|
||||
@ -162,7 +162,7 @@ void CreatePrimaryRequest<I>::refresh_image() {
|
||||
template <typename I>
|
||||
void CreatePrimaryRequest<I>::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<I>::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<I>::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<I>,
|
||||
@ -237,7 +237,7 @@ void CreatePrimaryRequest<I>::unlink_peer() {
|
||||
template <typename I>
|
||||
void CreatePrimaryRequest<I>::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<I>::handle_unlink_peer(int r) {
|
||||
template <typename I>
|
||||
void CreatePrimaryRequest<I>::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;
|
||||
|
@ -66,7 +66,7 @@ void DemoteRequest<I>::handle_enable_non_primary_feature(int r) {
|
||||
template <typename I>
|
||||
void DemoteRequest<I>::create_snapshot() {
|
||||
CephContext *cct = m_image_ctx->cct;
|
||||
ldout(cct, 20) << dendl;
|
||||
ldout(cct, 15) << dendl;
|
||||
|
||||
auto ctx = create_context_callback<
|
||||
DemoteRequest<I>, &DemoteRequest<I>::handle_create_snapshot>(this);
|
||||
@ -82,7 +82,7 @@ void DemoteRequest<I>::create_snapshot() {
|
||||
template <typename I>
|
||||
void DemoteRequest<I>::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<I>::handle_create_snapshot(int r) {
|
||||
template <typename I>
|
||||
void DemoteRequest<I>::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;
|
||||
|
@ -33,7 +33,7 @@ void GetImageStateRequest<I>::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<I>::read_object() {
|
||||
template <typename I>
|
||||
void GetImageStateRequest<I>::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<I>::handle_read_object(int r) {
|
||||
template <typename I>
|
||||
void GetImageStateRequest<I>::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 {
|
||||
|
@ -45,7 +45,7 @@ void PromoteRequest<I>::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<I>::send() {
|
||||
template <typename I>
|
||||
void PromoteRequest<I>::create_orphan_snapshot() {
|
||||
CephContext *cct = m_image_ctx->cct;
|
||||
ldout(cct, 20) << dendl;
|
||||
ldout(cct, 15) << dendl;
|
||||
|
||||
auto ctx = create_context_callback<
|
||||
PromoteRequest<I>,
|
||||
@ -67,7 +67,7 @@ void PromoteRequest<I>::create_orphan_snapshot() {
|
||||
template <typename I>
|
||||
void PromoteRequest<I>::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<I>::handle_create_orphan_snapshot(int r) {
|
||||
template <typename I>
|
||||
void PromoteRequest<I>::list_watchers() {
|
||||
CephContext *cct = m_image_ctx->cct;
|
||||
ldout(cct, 20) << dendl;
|
||||
ldout(cct, 15) << dendl;
|
||||
|
||||
auto ctx = create_context_callback<
|
||||
PromoteRequest<I>,
|
||||
@ -99,7 +99,7 @@ void PromoteRequest<I>::list_watchers() {
|
||||
template <typename I>
|
||||
void PromoteRequest<I>::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<I>::handle_list_watchers(int r) {
|
||||
template <typename I>
|
||||
void PromoteRequest<I>::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<I>::wait_update_notify() {
|
||||
template <typename I>
|
||||
void PromoteRequest<I>::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<I>::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<I>::scheduler_unregister_update_watcher() {
|
||||
template <typename I>
|
||||
void PromoteRequest<I>::unregister_update_watcher() {
|
||||
CephContext *cct = m_image_ctx->cct;
|
||||
ldout(cct, 20) << dendl;
|
||||
ldout(cct, 15) << dendl;
|
||||
|
||||
auto ctx = create_context_callback<
|
||||
PromoteRequest<I>,
|
||||
@ -183,7 +183,7 @@ void PromoteRequest<I>::unregister_update_watcher() {
|
||||
template <typename I>
|
||||
void PromoteRequest<I>::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<I>::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<I>::acquire_exclusive_lock() {
|
||||
template <typename I>
|
||||
void PromoteRequest<I>::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<I>::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<I>::rollback() {
|
||||
template <typename I>
|
||||
void PromoteRequest<I>::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<I>::handle_rollback(int r) {
|
||||
template <typename I>
|
||||
void PromoteRequest<I>::create_promote_snapshot() {
|
||||
CephContext *cct = m_image_ctx->cct;
|
||||
ldout(cct, 20) << dendl;
|
||||
ldout(cct, 15) << dendl;
|
||||
|
||||
auto ctx = create_context_callback<
|
||||
PromoteRequest<I>,
|
||||
@ -306,7 +306,7 @@ void PromoteRequest<I>::create_promote_snapshot() {
|
||||
template <typename I>
|
||||
void PromoteRequest<I>::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<I>::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<I>::release_exclusive_lock() {
|
||||
template <typename I>
|
||||
void PromoteRequest<I>::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<I>::handle_release_exclusive_lock(int r) {
|
||||
template <typename I>
|
||||
void PromoteRequest<I>::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;
|
||||
|
@ -32,7 +32,7 @@ void RemoveImageStateRequest<I>::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<I>::get_object_count() {
|
||||
template <typename I>
|
||||
void RemoveImageStateRequest<I>::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<I>::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<I>::remove_object() {
|
||||
template <typename I>
|
||||
void RemoveImageStateRequest<I>::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<I>::handle_remove_object(int r) {
|
||||
template <typename I>
|
||||
void RemoveImageStateRequest<I>::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;
|
||||
|
@ -33,7 +33,7 @@ void SetImageStateRequest<I>::send() {
|
||||
template <typename I>
|
||||
void SetImageStateRequest<I>::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<I>::get_snap_limit() {
|
||||
template <typename I>
|
||||
void SetImageStateRequest<I>::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<I>::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<I>::handle_get_snap_limit(int r) {
|
||||
template <typename I>
|
||||
void SetImageStateRequest<I>::get_metadata() {
|
||||
CephContext *cct = m_image_ctx->cct;
|
||||
ldout(cct, 20) << dendl;
|
||||
ldout(cct, 15) << dendl;
|
||||
|
||||
auto ctx = create_context_callback<
|
||||
SetImageStateRequest<I>,
|
||||
@ -87,7 +87,7 @@ void SetImageStateRequest<I>::get_metadata() {
|
||||
template <typename I>
|
||||
void SetImageStateRequest<I>::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<I>::handle_get_metadata(int r) {
|
||||
template <typename I>
|
||||
void SetImageStateRequest<I>::write_image_state() {
|
||||
CephContext *cct = m_image_ctx->cct;
|
||||
ldout(cct, 20) << dendl;
|
||||
ldout(cct, 15) << dendl;
|
||||
|
||||
auto ctx = create_context_callback<
|
||||
SetImageStateRequest<I>,
|
||||
@ -136,7 +136,7 @@ void SetImageStateRequest<I>::write_image_state() {
|
||||
template <typename I>
|
||||
void SetImageStateRequest<I>::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<I>::handle_write_image_state(int r) {
|
||||
template <typename I>
|
||||
void SetImageStateRequest<I>::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<I>::update_primary_snapshot() {
|
||||
template <typename I>
|
||||
void SetImageStateRequest<I>::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<I>::handle_update_primary_snapshot(int r) {
|
||||
template <typename I>
|
||||
void SetImageStateRequest<I>::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;
|
||||
|
@ -35,7 +35,7 @@ void UnlinkPeerRequest<I>::send() {
|
||||
template <typename I>
|
||||
void UnlinkPeerRequest<I>::refresh_image() {
|
||||
CephContext *cct = m_image_ctx->cct;
|
||||
ldout(cct, 20) << dendl;
|
||||
ldout(cct, 15) << dendl;
|
||||
|
||||
auto ctx = create_context_callback<
|
||||
UnlinkPeerRequest<I>, &UnlinkPeerRequest<I>::handle_refresh_image>(this);
|
||||
@ -45,7 +45,7 @@ void UnlinkPeerRequest<I>::refresh_image() {
|
||||
template <typename I>
|
||||
void UnlinkPeerRequest<I>::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<I>::unlink_peer() {
|
||||
&snap_it->second.snap_namespace);
|
||||
} else if (boost::get<cls::rbd::MirrorSnapshotNamespace>(
|
||||
&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<I>::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<I>::unlink_peer() {
|
||||
template <typename I>
|
||||
void UnlinkPeerRequest<I>::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<I>::handle_unlink_peer(int r) {
|
||||
template <typename I>
|
||||
void UnlinkPeerRequest<I>::notify_update() {
|
||||
CephContext *cct = m_image_ctx->cct;
|
||||
ldout(cct, 20) << dendl;
|
||||
ldout(cct, 15) << dendl;
|
||||
|
||||
auto ctx = create_context_callback<
|
||||
UnlinkPeerRequest<I>, &UnlinkPeerRequest<I>::handle_notify_update>(this);
|
||||
@ -146,7 +146,7 @@ void UnlinkPeerRequest<I>::notify_update() {
|
||||
template <typename I>
|
||||
void UnlinkPeerRequest<I>::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<I>::handle_notify_update(int r) {
|
||||
template <typename I>
|
||||
void UnlinkPeerRequest<I>::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<I>::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<I>::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<I>::remove_snapshot() {
|
||||
template <typename I>
|
||||
void UnlinkPeerRequest<I>::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<I>::handle_remove_snapshot(int r) {
|
||||
template <typename I>
|
||||
void UnlinkPeerRequest<I>::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;
|
||||
|
@ -66,7 +66,7 @@ void WriteImageStateRequest<I>::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<I>::write_object() {
|
||||
template <typename I>
|
||||
void WriteImageStateRequest<I>::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<I>::handle_write_object(int r) {
|
||||
template <typename I>
|
||||
void WriteImageStateRequest<I>::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;
|
||||
|
Loading…
Reference in New Issue
Block a user