i->get_type()).increment(i->get_length());
retire_stat.increment(i->get_length());
commit_retire_extent(t, i);
- if (i->backend_type == device_type_t::RANDOM_BLOCK) {
+ // FIXME: whether the extent belongs to RBM should be available through its
+ // device-id from its paddr after RBM is properly integrated.
+ /*
+ if (i belongs to RBM) {
paddr_t paddr = i->get_paddr();
rbm_alloc_delta_t delta;
delta.op = rbm_alloc_delta_t::op_types_t::CLEAR;
delta.alloc_blk_ranges.push_back(std::make_pair(paddr, i->get_length()));
t.add_rbm_alloc_info_blocks(delta);
}
+ */
}
record.extents.reserve(t.inline_block_list.size());
virtual ~CachedExtent();
- /// type of the backend device that will hold this extent
- device_type_t backend_type = device_type_t::NONE;
-
/// hint for allocators
placement_hint_t hint = placement_hint_t::NUM_HINTS;
lextent->get_paddr(),
ool_extent.get_ool_paddr()
).si_then([&ool_extent, &t, &lextent, this, FNAME] {
- lextent->backend_type = device_type_t::NONE;
lextent->hint = {};
TRACET("mark extent as ool at {} -- {}", t, ool_extent.get_ool_paddr(), *lextent);
t.mark_delayed_extent_ool(lextent, ool_extent.get_ool_paddr());
can_delay_allocation(dtype));
CachedExtentRef extent = cache.alloc_new_extent_by_type(
t, type, length, delay);
- extent->backend_type = dtype;
extent->hint = hint;
return extent;
}
can_delay_allocation(dtype));
TCachedExtentRef<T> extent = cache.alloc_new_extent<T>(
t, length, delay);
- extent->backend_type = dtype;
extent->hint = hint;
return extent;
}
}
// For now, just do ool allocation for any delayed extent
auto& allocator_ptr = get_allocator(
- extent->backend_type, extent->hint
+ get_allocator_type(extent->hint), extent->hint
);
alloc_map[allocator_ptr.get()].emplace_back(extent);
num_ool_extents++;