]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: close journal before removing 9140/head
authorYuan Zhou <yuan.zhou@intel.com>
Mon, 16 May 2016 08:18:59 +0000 (16:18 +0800)
committerYuan Zhou <yuan.zhou@intel.com>
Mon, 16 May 2016 08:18:59 +0000 (16:18 +0800)
Otherwise there is some unwanted error message.

Fixes: http://tracker.ceph.com/issues/15863
Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
src/librbd/internal.cc

index 92fab7f4cf12b9d3e27cae6851ed3423f96466a1..9fb0fac684a6345a3e72a442c79f3184885e8777 100644 (file)
@@ -1800,6 +1800,15 @@ remove_mirroring_image:
             }
           }
 
+          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)