]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore/BlueFS: replace flush_log with sync_metadata.
authorJianpeng Ma <jianpeng.ma@intel.com>
Thu, 9 Jan 2020 04:58:22 +0000 (12:58 +0800)
committerIgor Fedotov <ifedotov@suse.com>
Fri, 17 Apr 2020 10:51:24 +0000 (13:51 +0300)
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
(cherry picked from commit cdd0e87a73637c25e042caa4bd67497dc72c0386)

src/os/bluestore/BlueFS.cc
src/os/bluestore/BlueFS.h
src/test/objectstore/test_bluefs.cc

index f66dc5b585471883fec40663a5b00013df79710f..b68571e403914dd92e210e42ced9d4d227314f5f 100644 (file)
@@ -2131,12 +2131,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 cc97db73aec16eae59e8d87a1b223deec348a2f0..f719b3137e37d55434b6e46423d01c8397845b78 100644 (file)
@@ -508,7 +508,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 60e51a12d22814e1be82598f0710388ec8f2924b..9de5e8d8bdab94b6e79942e9ed4ae2c9cc701a55 100644 (file)
@@ -439,10 +439,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();
@@ -492,10 +492,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();