return ROUND_UP_TO(size, super.block_size);
}
+void BlueFS::compact_log()
+{
+ std::unique_lock<std::mutex> l(lock);
+ if (g_conf->bluefs_compact_log_sync) {
+ _compact_log_sync();
+ } else {
+ _compact_log_async(l);
+ }
+}
+
bool BlueFS::_should_compact_log()
{
uint64_t current = log_writer->file->fnode.size;
}
}
+void BlueFS::flush_log()
+{
+ std::unique_lock<std::mutex> l(lock);
+ _flush_and_sync_log(l);
+}
+
int BlueFS::_flush_and_sync_log(std::unique_lock<std::mutex>& l,
uint64_t want_seq,
uint64_t jump_to)
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
int sync();