]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
os/bluestore/BlueFS: _flush_bdev -> flush_bdev
authorSage Weil <sage@redhat.com>
Thu, 23 Jun 2016 13:48:21 +0000 (09:48 -0400)
committerSage Weil <sage@redhat.com>
Thu, 30 Jun 2016 16:56:56 +0000 (12:56 -0400)
It is safe to call without a lock.

Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueFS.cc
src/os/bluestore/BlueFS.h

index b81ca696c6f7a76eb2ddc0a83950d6ac88ca529b..4025eddbb55b6bfc14331b3b624684e97b9cc822 100644 (file)
@@ -277,7 +277,7 @@ int BlueFS::mkfs(uuid_d osd_uuid)
   // write supers
   super.log_fnode = log_file->fnode;
   _write_super();
-  _flush_bdev();
+  flush_bdev();
 
   // clean up
   super = bluefs_super_t();
@@ -1003,7 +1003,7 @@ void BlueFS::_compact_log()
   super.log_fnode = log_file->fnode;
   ++super.version;
   _write_super();
-  _flush_bdev();
+  flush_bdev();
 
   dout(10) << __func__ << " release old log extents " << old_extents << dendl;
   for (auto& r : old_extents) {
@@ -1054,11 +1054,11 @@ int BlueFS::_flush_and_sync_log()
   log_t.clear();
   log_t.seq = 0;  // just so debug output is less confusing
 
-  _flush_bdev();
+  flush_bdev();
   int r = _flush(log_writer, true);
   assert(r == 0);
   wait_for_aio(log_writer);
-  _flush_bdev();
+  flush_bdev();
 
   // clean dirty files
   dout(20) << __func__ << " log_seq_stable " << seq << dendl;
@@ -1309,8 +1309,9 @@ void BlueFS::_fsync(FileWriter *h)
   }
 }
 
-void BlueFS::_flush_bdev()
+void BlueFS::flush_bdev()
 {
+  // NOTE: this is safe to call without a lock.
   dout(20) << __func__ << dendl;
   for (auto p : bdev) {
     if (p)
index 1757418da110f49db151be29e9d4823d8da4c9ac..162cc634fcd0bced0002552881bfa200e1d313fc 100644 (file)
@@ -243,7 +243,7 @@ private:
 
   //void _aio_finish(void *priv);
 
-  void _flush_bdev();
+  void flush_bdev();  // this is safe to call without a lock
 
   int _preallocate(FileRef f, uint64_t off, uint64_t len);
   int _truncate(FileWriter *h, uint64_t off);