]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: handle additional journal replay states 7019/head
authorJason Dillaman <dillaman@redhat.com>
Fri, 15 Jan 2016 15:40:06 +0000 (10:40 -0500)
committerJason Dillaman <dillaman@redhat.com>
Fri, 15 Jan 2016 15:40:30 +0000 (10:40 -0500)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/Journal.cc

index cf5fc1d7290d9e6e5c8b93d6e1dd3b445db597af..3b52f522eefbd8f3866d5a260fd4f8625365af6f 100644 (file)
@@ -217,7 +217,9 @@ bool Journal<I>::is_journal_ready() const {
 template <typename I>
 bool Journal<I>::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 <typename I>
@@ -581,7 +583,7 @@ void Journal<I>::handle_replay_ready() {
   bufferlist data = replay_entry.get_data();
   bufferlist::iterator it = data.begin();
   Context *on_ready = create_context_callback<
-      Journal<I>, &Journal<I>::handle_replay_process_ready>(this);
+    Journal<I>, &Journal<I>::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);