size, shared_alloc_unit, "test shared allocator"),
shared_alloc_unit);
shared_alloc.a->init_add_free(0, size);
-
+ auto sg = make_scope_guard([&shared_alloc] { delete shared_alloc.a; });
BlueFS fs(g_ceph_context);
// DB device is fully utilized
ASSERT_EQ(0, fs.add_block_device(BlueFS::BDEV_DB, bdev_db.path, false));
for(uint64_t i = 5 * bluefs_alloc_unit; i < size; i += 2 * main_unit) {
shared_alloc.a->init_add_free(i, main_unit);
}
+ auto sg = make_scope_guard([&shared_alloc] { delete shared_alloc.a; });
BlueFS fs(g_ceph_context);
ASSERT_EQ(0, fs.add_block_device(BlueFS::BDEV_DB, bdev_slow.path, false,
size, main_unit, "test shared allocator"),
main_unit);
shared_alloc.a->init_add_free(bluefs_alloc_unit, size - bluefs_alloc_unit);
+ auto sg = make_scope_guard([&shared_alloc] { delete shared_alloc.a; });
BlueFS fs(g_ceph_context);
ASSERT_EQ(0, fs.add_block_device(BlueFS::BDEV_DB, bdev_slow.path, false,