]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: add MonitorStore::sync()
authorSage Weil <sage@inktank.com>
Mon, 20 Aug 2012 17:56:29 +0000 (10:56 -0700)
committerSage Weil <sage@inktank.com>
Mon, 20 Aug 2012 18:07:35 +0000 (11:07 -0700)
Signed-off-by: Sage Weil <sage@inktank.com>
src/mon/MonitorStore.cc
src/mon/MonitorStore.h

index 0093ef21ec22c147b3177ee3c59a09ef63de3d23..774898251be9a115a3f202372cb83e21f10b74ff 100644 (file)
@@ -420,3 +420,9 @@ int MonitorStore::put_bl_sn_map(const char *a,
   return 0;
 }
 
+void MonitorStore::sync()
+{
+  int dirfd = ::open(dir.c_str(), O_RDONLY);
+  sync_filesystem(dirfd);
+  ::close(dirfd);
+}
index 51bd4ca8f4fa27def4b9be013d0c263033643bb3..c76add387d26b0546b4d004c903c1c64e18abcf0 100644 (file)
@@ -36,6 +36,7 @@ public:
   int mkfs();  // wipe
   int mount();
   int umount();
+  void sync();
 
   // ints (stored as ascii)
   version_t get_int(const char *a, const char *b=0);