]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd-mirror: avoid potential deadlock
authorMykola Golub <mgolub@mirantis.com>
Wed, 4 May 2016 12:25:04 +0000 (15:25 +0300)
committerJason Dillaman <dillaman@redhat.com>
Fri, 20 May 2016 13:01:52 +0000 (09:01 -0400)
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
(cherry picked from commit 46bf727d43af4975beeb514630a99d59cfb0a406)

src/tools/rbd_mirror/ImageSync.cc

index f71dfdd6e57054355e71cc9ca6dac3d94fce675f..2c6f5aa58f7eb4c99991660d4a68d36d8ad30c4e 100644 (file)
@@ -166,8 +166,6 @@ void ImageSync<I>::send_copy_image() {
     return;
   }
 
-  update_progress("COPY_IMAGE");
-
   CephContext *cct = m_local_image_ctx->cct;
   ldout(cct, 20) << dendl;
 
@@ -179,6 +177,8 @@ void ImageSync<I>::send_copy_image() {
     ctx, m_progress_ctx);
   m_lock.Unlock();
 
+  update_progress("COPY_IMAGE");
+
   m_image_copy_request->send();
 }