From: Yuan Zhou Date: Mon, 16 May 2016 08:18:59 +0000 (+0800) Subject: rbd: close journal before removing X-Git-Tag: v11.0.0~481^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ecdad4acca635d4b9f0b407889dde9985ab3a506;p=ceph.git rbd: close journal before removing Otherwise there is some unwanted error message. Fixes: http://tracker.ceph.com/issues/15863 Signed-off-by: Yuan Zhou --- diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc index 92fab7f4cf12..9fb0fac684a6 100644 --- a/src/librbd/internal.cc +++ b/src/librbd/internal.cc @@ -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)