mirror of
https://github.com/ceph/ceph
synced 2025-04-11 04:02:04 +00:00
os/bluestore: test _extend_log sequence advance
Signed-off-by: Pere Diaz Bou <pdiabou@redhat.com>
This commit is contained in:
parent
81cc774ccc
commit
8c68a503f1
@ -1559,6 +1559,30 @@ TEST(BlueFS, test_log_runway_3) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(BlueFS, test_log_runway_advance_seq) {
|
||||||
|
uint64_t max_log_runway = 65536;
|
||||||
|
ConfSaver conf(g_ceph_context->_conf);
|
||||||
|
conf.SetVal("bluefs_alloc_size", "4096");
|
||||||
|
conf.SetVal("bluefs_shared_alloc_size", "4096");
|
||||||
|
conf.SetVal("bluefs_compact_log_sync", "false");
|
||||||
|
conf.SetVal("bluefs_min_log_runway", "32768");
|
||||||
|
conf.SetVal("bluefs_max_log_runway", std::to_string(max_log_runway).c_str());
|
||||||
|
conf.ApplyChanges();
|
||||||
|
|
||||||
|
uint64_t size = 1048576 * 128;
|
||||||
|
TempBdev bdev{size};
|
||||||
|
BlueFS fs(g_ceph_context);
|
||||||
|
ASSERT_EQ(0, fs.add_block_device(BlueFS::BDEV_DB, bdev.path, false));
|
||||||
|
uuid_d fsid;
|
||||||
|
ASSERT_EQ(0, fs.mkfs(fsid, { BlueFS::BDEV_DB, false, false }));
|
||||||
|
ASSERT_EQ(0, fs.mount());
|
||||||
|
ASSERT_EQ(0, fs.maybe_verify_layout({ BlueFS::BDEV_DB, false, false }));
|
||||||
|
|
||||||
|
std::string longdir(max_log_runway*2, 'A');
|
||||||
|
ASSERT_EQ(fs.mkdir(longdir), 0);
|
||||||
|
fs.compact_log();
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
auto args = argv_to_vec(argc, argv);
|
auto args = argv_to_vec(argc, argv);
|
||||||
map<string,string> defaults = {
|
map<string,string> defaults = {
|
||||||
|
Loading…
Reference in New Issue
Block a user