]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/Paxos: flush io on reset()
authorSage Weil <sage@redhat.com>
Thu, 21 Aug 2014 03:57:56 +0000 (20:57 -0700)
committerSage Weil <sage@redhat.com>
Wed, 27 Aug 2014 21:36:08 +0000 (14:36 -0700)
Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/Paxos.cc

index 03058781b6f685161f8f45da657356db2e4c7b03..c85beaabbf41a2fcb90d1a8b9091766b1f4007a3 100644 (file)
@@ -1339,6 +1339,13 @@ void Paxos::restart()
   cancel_events();
   new_value.clear();
 
+  if (is_writing()) {
+    dout(10) << __func__ << " flushing" << dendl;
+    mon->lock.Unlock();
+    mon->store->flush();
+    mon->lock.Lock();
+    dout(10) << __func__ << " flushed" << dendl;
+  }
   state = STATE_RECOVERING;
 
   finish_contexts(g_ceph_context, proposals, -EAGAIN);