From: Sage Weil Date: Fri, 15 Jan 2016 00:17:53 +0000 (-0500) Subject: os/FuseStore: wait for commit and flush in all updates X-Git-Tag: v10.0.4~154^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a47f8ffb807dfa56481d6f516aff6c040dac5043;p=ceph.git os/FuseStore: wait for commit and flush in all updates Signed-off-by: Sage Weil --- diff --git a/src/os/FuseStore.cc b/src/os/FuseStore.cc index 5d8303b7372a..1895a760d588 100644 --- a/src/os/FuseStore.cc +++ b/src/os/FuseStore.cc @@ -661,7 +661,9 @@ static int os_mkdir(const char *path, mode_t mode) ceph::shared_ptr osr( new ObjectStore::Sequencer("fuse")); fs->store->apply_transaction(&*osr, t); - osr->flush(); + C_SaferCond waiter; + if (!osr->flush_commit(&waiter)) + waiter.wait(); } return 0; @@ -730,7 +732,9 @@ static int os_create(const char *path, mode_t mode, struct fuse_file_info *fi) ceph::shared_ptr osr( new ObjectStore::Sequencer("fuse")); fs->store->apply_transaction(&*osr, t); - osr->flush(); + C_SaferCond waiter; + if (!osr->flush_commit(&waiter)) + waiter.wait(); } if (pbl) { @@ -838,7 +842,9 @@ int os_flush(const char *path, struct fuse_file_info *fi) ceph::shared_ptr osr( new ObjectStore::Sequencer("fuse")); fs->store->apply_transaction(&*osr, t); - osr->flush(); + C_SaferCond waiter; + if (!osr->flush_commit(&waiter)) + waiter.wait(); return 0; } @@ -899,7 +905,9 @@ static int os_unlink(const char *path) ceph::shared_ptr osr( new ObjectStore::Sequencer("fuse")); fs->store->apply_transaction(&*osr, t); - osr->flush(); + C_SaferCond waiter; + if (!osr->flush_commit(&waiter)) + waiter.wait(); return 0; } @@ -932,7 +940,9 @@ static int os_truncate(const char *path, off_t size) ceph::shared_ptr osr( new ObjectStore::Sequencer("fuse")); fs->store->apply_transaction(&*osr, t); - osr->flush(); + C_SaferCond waiter; + if (!osr->flush_commit(&waiter)) + waiter.wait(); return 0; }