const char* p_insert = node.p_start() +
node.fields().get_item_end_offset(index, mut.get_length());
const char* p_insert_front = p_insert - size_right;
- FieldType::template insert_at<KT>(mut, key, node.fields(), index, size_right);
+ FieldType::insert_at(mut, key, node.fields(), index, size_right);
mut.shift_absolute(p_left_bound,
p_insert - p_left_bound,
-(int)size_right);
}
template <typename SlotType>
-template <KeyT KT>
+template <IsFullKey Key>
void F013_T::insert_at(
- NodeExtentMutable& mut, const full_key_t<KT>& key,
+ NodeExtentMutable& mut, const Key& key,
const me_t& node, index_t index, node_offset_t size_right)
{
assert(index <= node.num_keys);
append_offset(mut, new_offset, p_insert);
}
#define IA_TEMPLATE(ST, KT) template void F013_INST(ST):: \
- insert_at<KT>(NodeExtentMutable&, const full_key_t<KT>&, \
+ insert_at<KT>(NodeExtentMutable&, const KT&, \
const F013_INST(ST)&, index_t, node_offset_t)
-IA_TEMPLATE(slot_0_t, KeyT::VIEW);
-IA_TEMPLATE(slot_1_t, KeyT::VIEW);
-IA_TEMPLATE(slot_3_t, KeyT::VIEW);
-IA_TEMPLATE(slot_0_t, KeyT::HOBJ);
-IA_TEMPLATE(slot_1_t, KeyT::HOBJ);
-IA_TEMPLATE(slot_3_t, KeyT::HOBJ);
+IA_TEMPLATE(slot_0_t, key_view_t);
+IA_TEMPLATE(slot_1_t, key_view_t);
+IA_TEMPLATE(slot_3_t, key_view_t);
+IA_TEMPLATE(slot_0_t, key_hobj_t);
+IA_TEMPLATE(slot_1_t, key_hobj_t);
+IA_TEMPLATE(slot_3_t, key_hobj_t);
template <typename SlotType>
node_offset_t F013_T::erase_at(
}
static node_offset_t estimate_insert_one() { return sizeof(SlotType); }
- template <KeyT KT>
+ template <IsFullKey Key>
static void insert_at(
- NodeExtentMutable&, const full_key_t<KT>& key,
+ NodeExtentMutable&, const Key& key,
const me_t& node, index_t index, node_offset_t size_right);
static node_offset_t erase_at(NodeExtentMutable&, const me_t&, index_t, const char*);
static void update_size_at(
key_view_t key_view;
char* p_fill = (char*)p_mem + key_size;
- auto spc = shard_pool_crush_t::from_key<KeyT::HOBJ>(key_hobj);
+ auto spc = shard_pool_crush_t::from_key(key_hobj);
p_fill -= sizeof(shard_pool_crush_t);
std::memcpy(p_fill, &spc, sizeof(shard_pool_crush_t));
key_view.set(*reinterpret_cast<const shard_pool_crush_t*>(p_fill));
ns_oid_view_t ns_oid_view(p_ns_oid);
key_view.set(ns_oid_view);
- auto sg = snap_gen_t::from_key<KeyT::HOBJ>(key_hobj);
+ auto sg = snap_gen_t::from_key(key_hobj);
p_fill -= sizeof(snap_gen_t);
ceph_assert(p_fill == (char*)p_mem);
std::memcpy(p_fill, &sg, sizeof(snap_gen_t));