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: v10.2.2~23^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F9556%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 (cherry picked from commit d10ffaafbd2a5831154757b848ed8504dad99069) --- diff --git a/src/test/librbd/fsx.cc b/src/test/librbd/fsx.cc index f0519ec7d62e..2a06b345e6d4 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 */ /* @@ -394,6 +396,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); @@ -401,8 +407,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);