]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: only erase IO events after they are marked safe
authorJason Dillaman <dillaman@redhat.com>
Tue, 1 Sep 2015 01:27:53 +0000 (21:27 -0400)
committerJason Dillaman <dillaman@redhat.com>
Fri, 13 Nov 2015 04:27:57 +0000 (23:27 -0500)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/Journal.cc

index 737a120f5a5bc1b921e80437b5ebd8457f26a25f..ca4221e11a756ae3070c0702833fbc984705a4ab 100644 (file)
@@ -357,7 +357,9 @@ void Journal::complete_event(Events::iterator it, int r) {
                  << "r=" << r << dendl;
 
   m_journaler->committed(it->second.future);
-  m_events.erase(it);
+  if (it->second.safe) {
+    m_events.erase(it);
+  }
 }
 
 void Journal::handle_initialized(int r) {