This way, we can let depth 0 be the actual logical extents.
Signed-off-by: Samuel Just <sjust@redhat.com>
auto root_leaf = cache.alloc_new_extent<LBALeafNode>(
t,
LBA_BLOCK_SIZE);
+ root_leaf->set_depth(1);
root_leaf->set_size(0);
croot->get_lba_root() =
root_t{
- 0,
+ 1,
0,
root_leaf->get_paddr(),
make_record_relative_paddr(0)};
paddr_t offset,
paddr_t base) {
offset = offset.maybe_relative_to(base);
- if (depth > 0) {
+ ceph_assert(depth > 0);
+ if (depth > 1) {
logger().debug(
"get_lba_btree_extent: reading internal at offset {}, depth {}",
offset,