Merge pull request #9140 from zhouyuan/fix_disable_journaling

librbd: close journal before removing

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
This commit is contained in:
Jason Dillaman 2016-05-20 08:22:56 -04:00
commit 6a40444d77

View 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)