}
CephContext *cct = m_image_ctx->cct;
- ldout(cct, 20) << dendl;
+ ldout(cct, 15) << dendl;
auto ctx = create_context_callback<
CreateNonPrimaryRequest<I>,
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;
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);
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) {
}
CephContext *cct = m_image_ctx->cct;
- ldout(cct, 20) << dendl;
+ ldout(cct, 15) << dendl;
librados::ObjectReadOperation op;
cls_client::mirror_peer_list_start(&op);
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) {
}
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>,
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)
}
CephContext *cct = m_image_ctx->cct;
- ldout(cct, 20) << dendl;
+ ldout(cct, 15) << dendl;
auto ctx = create_context_callback<
CreateNonPrimaryRequest<I>,
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)
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;
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);
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) {
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>,
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)
}
CephContext *cct = m_image_ctx->cct;
- ldout(cct, 20) << dendl;
+ ldout(cct, 15) << dendl;
auto ctx = create_context_callback<
CreatePrimaryRequest<I>,
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;
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();
}
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>,
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;
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;
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);
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)
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;
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();
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)
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 {
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();
}
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>,
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)
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>,
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)
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);
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;
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--;
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>,
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)
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);
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)
}
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};
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;
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>,
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)
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();
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)
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;
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);
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)
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();
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)
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;
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);
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();
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();
}
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>,
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)
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>,
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)
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(
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)
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;
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);
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;
&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;
}
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,
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();
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);
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;
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;
}
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;
}
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;
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;
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;
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);
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)
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;