Merge pull request #4718 from athanatos/wip-sync-omap

FileStore: sync object_map when we syncfs

Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Samuel Just 2015-06-04 11:24:43 -07:00
commit e5b18903bc

View File

@ -2017,7 +2017,12 @@ void FileStore::_set_global_replay_guard(coll_t cid,
return;
// sync all previous operations on this sequencer
int ret = sync_filesystem(basedir_fd);
int ret = object_map->sync();
if (ret < 0) {
derr << __func__ << " : omap sync error " << cpp_strerror(ret) << dendl;
assert(0 == "_set_global_replay_guard failed");
}
ret = sync_filesystem(basedir_fd);
if (ret < 0) {
derr << __func__ << " :sync_filesytem error " << cpp_strerror(ret) << dendl;
assert(0 == "_set_global_replay_guard failed");
@ -3620,6 +3625,7 @@ void FileStore::sync_entry()
apply_manager.commit_started();
op_tp.unpause();
object_map->sync();
int err = backend->syncfs();
if (err < 0) {
derr << "syncfs got " << cpp_strerror(err) << dendl;