Skip to content

Commit

Permalink
Merge pull request ceph#32563 from majianpeng/bluefs-remove-flush-log
Browse files Browse the repository at this point in the history
os/bluestore/BlueFS: replace flush_log with sync_metadata.

Reviewed-by: Igor Fedotov <[email protected]>
  • Loading branch information
tchaikov authored Jan 10, 2020
2 parents 5e9b552 + cdd0e87 commit 9128924
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
6 changes: 0 additions & 6 deletions src/os/bluestore/BlueFS.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion src/os/bluestore/BlueFS.h
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,6 @@ class BlueFS {
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
Expand Down
8 changes: 4 additions & 4 deletions src/test/objectstore/test_bluefs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 9128924

Please sign in to comment.