]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: sync on shutdown
authorSage Weil <sage@newdream.net>
Tue, 28 Oct 2008 23:50:17 +0000 (16:50 -0700)
committerSage Weil <sage@newdream.net>
Tue, 28 Oct 2008 23:50:17 +0000 (16:50 -0700)
There may be write completion callbacks in flight that depend on what
we're about to tear down.

src/osd/OSD.cc

index cc8c15971aaf1b31932b8fbc295b90e6d0b141c4..15ac8eee2a80f403ccc381bbcc730daf28c78c35 100644 (file)
@@ -434,6 +434,11 @@ int OSD::shutdown()
   timer.cancel_all();
   timer.join();
 
+  // flush data to disk
+  osd_lock.Unlock();
+  store->sync();
+  osd_lock.Lock();
+
   // finish ops
   wait_for_no_ops();