copy_to_node();
}
+ static constexpr extent_types_t TYPE = extent_types_t::COLL_BLOCK;
extent_types_t get_type() const final {
- return type;
+ return TYPE;
}
std::ostream &print_detail_l(std::ostream &out) const final;
LBANode(std::forward<T>(t)...),
FixedKVNodeLayout(get_bptr().c_str()) {}
- static constexpr extent_types_t type = extent_types_t::LADDR_INTERNAL;
+ static constexpr extent_types_t TYPE = extent_types_t::LADDR_INTERNAL;
lba_node_meta_t get_node_meta() const final { return get_meta(); }
op_context_t c,
LBANodeRef &_right,
bool prefer_left) final {
- ceph_assert(_right->get_type() == type);
+ ceph_assert(_right->get_type() == TYPE);
auto &right = *_right->cast<LBAInternalNode>();
auto replacement_left = c.cache.alloc_new_extent<LBAInternalNode>(
c.trans, LBA_BLOCK_SIZE);
}
extent_types_t get_type() const final {
- return type;
+ return TYPE;
}
std::ostream &print_detail(std::ostream &out) const final;
LBANode(std::forward<T>(t)...),
FixedKVNodeLayout(get_bptr().c_str()) {}
- static constexpr extent_types_t type = extent_types_t::LADDR_LEAF;
+ static constexpr extent_types_t TYPE = extent_types_t::LADDR_LEAF;
lba_node_meta_t get_node_meta() const final { return get_meta(); }
op_context_t c,
LBANodeRef &_right,
bool prefer_left) final {
- ceph_assert(_right->get_type() == type);
+ ceph_assert(_right->get_type() == TYPE);
auto &right = *_right->cast<LBALeafNode>();
auto replacement_left = c.cache.alloc_new_extent<LBALeafNode>(
c.trans, LBA_BLOCK_SIZE);
}
extent_types_t get_type() const final {
- return type;
+ return TYPE;
}
std::ostream &print_detail(std::ostream &out) const final;
OMapInnerNode::make_balanced(omap_context_t oc, OMapNodeRef _right)
{
logger().debug("OMapInnerNode: {}", __func__);
- ceph_assert(_right->get_type() == type);
+ ceph_assert(_right->get_type() == TYPE);
return oc.tm.alloc_extents<OMapInnerNode>(oc.t, L_ADDR_MIN, OMAP_BLOCK_SIZE, 2)
.si_then([this, _right] (auto &&replacement_pair){
auto replacement_left = replacement_pair.front();
OMapLeafNode::full_merge_ret
OMapLeafNode::make_full_merge(omap_context_t oc, OMapNodeRef right)
{
- ceph_assert(right->get_type() == type);
+ ceph_assert(right->get_type() == TYPE);
logger().debug("OMapLeafNode: {}", __func__);
return oc.tm.alloc_extent<OMapLeafNode>(oc.t, L_ADDR_MIN, OMAP_BLOCK_SIZE)
.si_then([this, right] (auto &&replacement) {
OMapLeafNode::make_balanced_ret
OMapLeafNode::make_balanced(omap_context_t oc, OMapNodeRef _right)
{
- ceph_assert(_right->get_type() == type);
+ ceph_assert(_right->get_type() == TYPE);
logger().debug("OMapLeafNode: {}", __func__);
return oc.tm.alloc_extents<OMapLeafNode>(oc.t, L_ADDR_MIN, OMAP_BLOCK_SIZE, 2)
.si_then([this, _right] (auto &&replacement_pair) {
OMapNode(std::forward<T>(t)...),
StringKVInnerNodeLayout(get_bptr().c_str()) {}
- static constexpr extent_types_t type = extent_types_t::OMAP_INNER;
-
omap_node_meta_t get_node_meta() const final { return get_meta(); }
bool extent_will_overflow(size_t ksize, std::optional<size_t> vsize) const {
return is_overflow(ksize);
std::ostream &print_detail_l(std::ostream &out) const final;
+ static constexpr extent_types_t TYPE = extent_types_t::OMAP_INNER;
extent_types_t get_type() const final {
- return type;
+ return TYPE;
}
ceph::bufferlist get_delta() final {
OMapNode(std::forward<T>(t)...),
StringKVLeafNodeLayout(get_bptr().c_str()) {}
- static constexpr extent_types_t type = extent_types_t::OMAP_LEAF;
-
omap_node_meta_t get_node_meta() const final { return get_meta(); }
bool extent_will_overflow(
size_t ksize, std::optional<size_t> vsize) const {
omap_context_t oc,
OMapNodeRef _right) final;
+ static constexpr extent_types_t TYPE = extent_types_t::OMAP_LEAF;
extent_types_t get_type() const final {
- return type;
+ return TYPE;
}
ceph::bufferlist get_delta() final {
SeastoreNodeExtent(const SeastoreNodeExtent& other)
: NodeExtent(other) {}
~SeastoreNodeExtent() override = default;
+
+ constexpr static extent_types_t TYPE = extent_types_t::ONODE_BLOCK_STAGED;
+ extent_types_t get_type() const override {
+ return TYPE;
+ }
+
protected:
NodeExtentRef mutate(context_t, DeltaRecorderURef&&) override;
CachedExtentRef duplicate_for_write() override {
return CachedExtentRef(new SeastoreNodeExtent(*this));
}
- extent_types_t get_type() const override {
- return extent_types_t::ONODE_BLOCK_STAGED;
- }
ceph::bufferlist get_delta() override {
assert(recorder);
return recorder->get_delta();
}
void apply_delta(const ceph::bufferlist&) override;
+
private:
DeltaRecorderURef recorder;
};