]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore/BlueFS: replace flush_log with sync_metadata. 32563/head
authorJianpeng Ma <jianpeng.ma@intel.com>
Thu, 9 Jan 2020 04:58:22 +0000 (12:58 +0800)
committerJianpeng Ma <jianpeng.ma@intel.com>
Thu, 9 Jan 2020 04:58:22 +0000 (12:58 +0800)
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/os/bluestore/BlueFS.cc
src/os/bluestore/BlueFS.h
src/test/objectstore/test_bluefs.cc

index 26572052dfa46f803ca30d7ca52731b0d687e87d..e7ccb7c8273149a7c0548bddce268b1305987616 100644 (file)
@@ -2367,12 +2367,6 @@ void BlueFS::_pad_bl(bufferlist& bl)
   }
 }
 
-void BlueFS::flush_log()
-{
-  std::unique_lock l(lock);
-  flush_bdev();
-  _flush_and_sync_log(l);
-}
 
 int BlueFS::_flush_and_sync_log(std::unique_lock<ceph::mutex>& l,
                                uint64_t want_seq,
index 3ae173f80ffbf37e81e1b7dd8c23d1cff099196c..4879ebb9485b3f8b205e108403652df7535c5af5 100644 (file)
@@ -504,7 +504,6 @@ public:
   int lock_file(const string& dirname, const string& filename, FileLock **p);
   int unlock_file(FileLock *l);
 
-  void flush_log();
   void compact_log();
 
   /// sync any uncommitted state to disk
index a22b50a09e7ac4d9d83eba3af87f1b81e8cc6440..ef838ab124f2f1294f3b08da025973097b27c857 100644 (file)
@@ -502,10 +502,10 @@ TEST(BlueFS, test_simple_compaction_sync) {
           string file = "file.";
          file.append(to_string(j));
           fs.unlink(dir, file);
-         fs.flush_log();
+         fs.sync_metadata();
        }
        ASSERT_EQ(0, fs.rmdir(dir));
-       fs.flush_log();
+       fs.sync_metadata();
     }
   }
   fs.compact_log();
@@ -555,10 +555,10 @@ TEST(BlueFS, test_simple_compaction_async) {
           string file = "file.";
          file.append(to_string(j));
           fs.unlink(dir, file);
-         fs.flush_log();
+         fs.sync_metadata();
        }
        ASSERT_EQ(0, fs.rmdir(dir));
-       fs.flush_log();
+       fs.sync_metadata();
     }
   }
   fs.compact_log();