derr << "SMR device but freelist_type = " << freelist_type << " (not zoned)"
<< dendl;
return -EINVAL;
- } else if (!bdev->is_smr() && freelist_type == "zoned") {
+ }
+ if (!bdev->is_smr() && freelist_type == "zoned") {
derr << "non-SMR device (or SMR support not built-in) but freelist_type = zoned"
<< dendl;
return -EINVAL;
return;
}
-bool BlueStore::has_null_fm()
-{
- return fm->is_null_manager();
-}
-
bool BlueStore::BigDeferredWriteContext::can_defer(
BlueStore::extent_map_t::iterator ep,
uint64_t prefer_deferred_size,
ceph_assert(prefix == "B");
if (type == "bitmap") {
return new BitmapFreelistManager(cct, "B", "b");
- } else if (type == "null") {
+ }
+ if (type == "null") {
// use BitmapFreelistManager with the null option to stop allocations from going to RocksDB
auto *fm = new BitmapFreelistManager(cct, "B", "b");
fm->set_null_manager();
ASSERT_EQ(bstore->fsck(false), 0);
ASSERT_EQ(bstore->repair(false), 0);
bstore->mount();
- if (!bstore->has_null_fm()) {
+ if (!bstore->has_null_manager()) {
bstore->inject_leaked(0x30000);
err_was_injected = true;
}
//////////// false free fix ////////////
cerr << "fix false free pextents" << std::endl;
bstore->mount();
- if (!bstore->has_null_fm()) {
+ if (!bstore->has_null_manager()) {
bstore->inject_false_free(cid, hoid);
err_was_injected = true;
}
bstore->inject_misreference(cid, hoid, cid, hoid_dup, 0);
bstore->inject_misreference(cid, hoid, cid, hoid_dup, (offs_base * repeats) / 2);
bstore->inject_misreference(cid, hoid, cid, hoid_dup, offs_base * (repeats -1) );
- int expected_errors = bstore->has_null_fm() ? 3 : 6;
+ int expected_errors = bstore->has_null_manager() ? 3 : 6;
bstore->umount();
ASSERT_EQ(bstore->fsck(false), expected_errors);
ASSERT_EQ(bstore->repair(false), 0);