From d10ffaafbd2a5831154757b848ed8504dad99069 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Thu, 2 Jun 2016 10:41:18 -0400 Subject: [PATCH] test/rbd: fsx needs to shut down the journal Fixes: http://tracker.ceph.com/issues/16123 Signed-off-by: Jason Dillaman --- src/test/librbd/fsx.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/test/librbd/fsx.cc b/src/test/librbd/fsx.cc index daee85e2205..c52f3ecd839 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);