OPTION(bluestore_bluefs, OPT_BOOL)
OPTION(bluestore_bluefs_env_mirror, OPT_BOOL) // mirror to normal Env for debug
-OPTION(bluestore_bluefs_min, OPT_U64) // 1gb
// how often (sec) to dump allocator on allocation failure
OPTION(bluestore_bluefs_alloc_failure_dump_interval, OPT_FLOAT)
.set_flag(Option::FLAG_CREATE)
.set_description("Mirror bluefs data to file system for testing/validation"),
- Option("bluestore_bluefs_min", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
- .set_default(1_G)
- .set_description("minimum disk space allocated to BlueFS (e.g., at mkfs)"),
-
- Option("bluestore_bluefs_min_free", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
- .set_default(1_G)
- .set_description("minimum free space allocated to BlueFS"),
-
Option("bluestore_bluefs_alloc_failure_dump_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
.set_default(0)
.set_description("How frequently (in seconds) to dump allocator on"
ceph_assert(bdev);
ceph_assert(min_alloc_size); // _get_odisk_reserved depends on that
uint64_t dev_size = bdev->get_size();
- if (dev_size <
- _get_ondisk_reserved() + cct->_conf->bluestore_bluefs_min) {
- dout(1) << __func__ << " main device size " << byte_u_t(dev_size)
- << " is too small, disable bluestore_bluefs_min for now"
- << dendl;
- ceph_assert(dev_size >= _get_ondisk_reserved());
-
- int r = cct->_conf.set_val("bluestore_bluefs_min", "0");
- ceph_assert(r == 0);
- }
+ ceph_assert(dev_size > _get_ondisk_reserved());
}
void BlueStore::_close_bdev()
int r = _mount_for_bluefs();
- // require bluestore_bluefs_min_free to be free at target device!
- uint64_t used_space = cct->_conf.get_val<Option::size_t>("bluestore_bluefs_min_free");
+ uint64_t used_space = 0;
for(auto src_id : devs_source) {
used_space += bluefs->get_total(src_id) - bluefs->get_free(src_id);
}
bstore->mount();
}
-TEST_P(StoreTestSpecificAUSize, BluestoreTinyDevFailure) {
- if (string(GetParam()) != "bluestore")
- return;
- // This caused superblock overwrite by bluefs, see
- // https://tracker.ceph.com/issues/24480
- SetVal(g_conf(), "bluestore_block_size",
- stringify(1024 * 1024 * 1024).c_str()); //1 Gb
- SetVal(g_conf(), "bluestore_block_db_size", "0");
- SetVal(g_conf(), "bluestore_block_db_create", "false");
- SetVal(g_conf(), "bluestore_bluefs_min",
- stringify(1024 * 1024 * 1024).c_str());
- StartDeferred(0x1000);
- store->umount();
- ASSERT_EQ(store->fsck(false), 0); // do fsck explicitly
- store->mount();
-}
-
-TEST_P(StoreTestSpecificAUSize, BluestoreTinyDevFailure2) {
- if (string(GetParam()) != "bluestore")
- return;
-
- // This caused assert in allocator as initial bluefs extent as slow device
- // overlaped with superblock
- // https://tracker.ceph.com/issues/24480
- SetVal(g_conf(), "bluestore_block_size",
- stringify(1024 * 1024 * 1024).c_str()); //1 Gb
- SetVal(g_conf(), "bluestore_block_db_size",
- stringify(1024 * 1024 * 1024).c_str()); //1 Gb
- SetVal(g_conf(), "bluestore_block_db_create", "true");
- SetVal(g_conf(), "bluestore_bluefs_min",
- stringify(1024 * 1024 * 1024).c_str());
- StartDeferred(0x1000);
- store->umount();
- ASSERT_EQ(store->fsck(false), 0); // do fsck explicitly
- store->mount();
-}
-
TEST_P(StoreTest, SpuriousReadErrorTest) {
if (string(GetParam()) != "bluestore")
return;