From: Jason Dillaman Date: Thu, 2 Jun 2016 14:41:18 +0000 (-0400) Subject: test/rbd: fsx needs to shut down the journal X-Git-Tag: v11.0.0~316^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F9459%2Fhead;p=ceph.git test/rbd: fsx needs to shut down the journal Fixes: http://tracker.ceph.com/issues/16123 Signed-off-by: Jason Dillaman --- diff --git a/src/test/librbd/fsx.cc b/src/test/librbd/fsx.cc index daee85e22055..c52f3ecd8390 100644 --- a/src/test/librbd/fsx.cc +++ b/src/test/librbd/fsx.cc @@ -54,6 +54,8 @@ #include "journal/ReplayEntry.h" #include "journal/ReplayHandler.h" +#include + #define NUMPRINTCOLUMNS 32 /* # columns of data to print on each line */ /* @@ -395,6 +397,10 @@ int replay_journal(rados_ioctx_t ioctx, const char *image_name, journal::Journaler journaler(io_ctx, image_id, JOURNAL_CLIENT_ID, 0); C_SaferCond init_ctx; journaler.init(&init_ctx); + BOOST_SCOPE_EXIT_ALL( (&journaler) ) { + journaler.shut_down(); + }; + r = init_ctx.wait(); if (r < 0) { simple_err("failed to initialize journal", r); @@ -402,8 +408,13 @@ int replay_journal(rados_ioctx_t ioctx, const char *image_name, } journal::Journaler replay_journaler(io_ctx, replay_image_id, "", 0); + C_SaferCond replay_init_ctx; replay_journaler.init(&replay_init_ctx); + BOOST_SCOPE_EXIT_ALL( (&replay_journaler) ) { + replay_journaler.shut_down(); + }; + r = replay_init_ctx.wait(); if (r < 0) { simple_err("failed to initialize replay journal", r);