From: Jason Dillaman Date: Fri, 15 Jan 2016 15:40:06 +0000 (-0500) Subject: librbd: handle additional journal replay states X-Git-Tag: v10.0.3~24^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F7019%2Fhead;p=ceph.git librbd: handle additional journal replay states Signed-off-by: Jason Dillaman --- diff --git a/src/librbd/Journal.cc b/src/librbd/Journal.cc index cf5fc1d7290d..3b52f522eefb 100644 --- a/src/librbd/Journal.cc +++ b/src/librbd/Journal.cc @@ -217,7 +217,9 @@ bool Journal::is_journal_ready() const { template bool Journal::is_journal_replaying() const { Mutex::Locker locker(m_lock); - return (m_state == STATE_REPLAYING); + return (m_state == STATE_REPLAYING || + m_state == STATE_FLUSHING_REPLAY || + m_state == STATE_RESTARTING_REPLAY); } template @@ -581,7 +583,7 @@ void Journal::handle_replay_ready() { bufferlist data = replay_entry.get_data(); bufferlist::iterator it = data.begin(); Context *on_ready = create_context_callback< - Journal, &Journal::handle_replay_process_ready>(this); + Journal, &Journal::handle_replay_process_ready>(this); Context *on_commit = new C_ReplayProcessSafe(this, std::move(replay_entry)); m_journal_replay->process(&it, on_ready, on_commit);