]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: close journal before removing 9548/head
authorYuan Zhou <yuan.zhou@intel.com>
Mon, 16 May 2016 08:18:59 +0000 (16:18 +0800)
committerAbhishek Varshney <abhishek.varshney@flipkart.com>
Tue, 7 Jun 2016 13:32:19 +0000 (19:02 +0530)
Otherwise there is some unwanted error message.

Fixes: http://tracker.ceph.com/issues/15863
Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
(cherry picked from commit ecdad4acca635d4b9f0b407889dde9985ab3a506)

src/librbd/internal.cc

index 2445bdacd3bab2964084337a4c9926f04d37690f..a392b3933df5f4f03cb4b1a7cfc92c18ba81db6f 100644 (file)
@@ -1817,6 +1817,15 @@ int mirror_image_disable_internal(ImageCtx *ictx, bool force,
             }
           }
 
+          C_SaferCond cond;
+          ictx->journal->close(&cond);
+          r = cond.wait();
+          if (r < 0) {
+            lderr(cct) << "error closing image journal: " << cpp_strerror(r)
+                       << dendl;
+            return r;
+          }
+
           r = Journal<>::remove(ictx->md_ctx, ictx->id);
           if (r < 0) {
             lderr(cct) << "error removing image journal: " << cpp_strerror(r)