]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd-mirror: lock ordering issue in status update callback
authorJason Dillaman <dillaman@redhat.com>
Tue, 17 May 2016 20:14:42 +0000 (16:14 -0400)
committerJason Dillaman <dillaman@redhat.com>
Thu, 19 May 2016 13:52:36 +0000 (09:52 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/tools/rbd_mirror/ImageSync.cc

index 2c6f5aa58f7eb4c99991660d4a68d36d8ad30c4e..24202f496f1d663ccc4487e8a4df50641be520f3 100644 (file)
@@ -210,6 +210,8 @@ void ImageSync<I>::handle_copy_image(int r) {
 
 template <typename I>
 void ImageSync<I>::send_copy_object_map() {
+  update_progress("COPY_OBJECT_MAP");
+
   m_local_image_ctx->snap_lock.get_read();
   if (!m_local_image_ctx->test_features(RBD_FEATURE_OBJECT_MAP,
                                         m_local_image_ctx->snap_lock)) {
@@ -218,8 +220,6 @@ void ImageSync<I>::send_copy_object_map() {
     return;
   }
 
-  update_progress("COPY_OBJECT_MAP");
-
   assert(m_local_image_ctx->object_map != nullptr);
 
   assert(!m_client_meta->sync_points.empty());