mon: add MonitorStore::sync()

Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
Sage Weil 2012-08-20 10:56:29 -07:00
parent cfe211af13
commit 19ea31268b
2 changed files with 7 additions and 0 deletions

View 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);
}

View 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);