If the exclusive lock was lost due to a watch failure from an
overloaded cluster, gracefully abort the image sync.
Fixes: http://tracker.ceph.com/issues/16558
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
m_local_image_ctx->snap_lock.put_read();
finish(0);
return;
+ } else if (m_local_image_ctx->object_map == nullptr) {
+ // possible that exclusive lock was lost in background
+ derr << ": object map is not initialized" << dendl;
+
+ m_local_image_ctx->snap_lock.put_read();
+ finish(-EINVAL);
+ return;
}
assert(m_local_image_ctx->object_map != nullptr);