Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
}
}
-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,
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
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();
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();