mirror of
https://github.com/ceph/ceph
synced 2025-02-23 11:07:35 +00:00
crimson/os/seastore/cache: drop the unnecessary friend fixed_kv_btree
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
This commit is contained in:
parent
ac30ee6cd9
commit
0558ef8b1a
@ -579,12 +579,12 @@ public:
|
||||
if constexpr (
|
||||
std::is_base_of_v<typename internal_node_t::base_t, child_node_t>)
|
||||
{
|
||||
assert(!c.cache.query_cache(i->get_val(), nullptr));
|
||||
assert(!c.cache.test_query_cache(i->get_val()));
|
||||
} else {
|
||||
if constexpr (leaf_has_children) {
|
||||
assert(i->get_val().pladdr.is_paddr()
|
||||
? (bool)!c.cache.query_cache(
|
||||
i->get_val().pladdr.get_paddr(), nullptr)
|
||||
? (bool)!c.cache.test_query_cache(
|
||||
i->get_val().pladdr.get_paddr())
|
||||
: true);
|
||||
}
|
||||
}
|
||||
|
@ -600,6 +600,12 @@ public:
|
||||
return epm.get_block_size();
|
||||
}
|
||||
|
||||
// Interfaces only for tests.
|
||||
public:
|
||||
CachedExtentRef test_query_cache(paddr_t offset) {
|
||||
return query_cache(offset, nullptr);
|
||||
}
|
||||
|
||||
private:
|
||||
// This is a workaround std::move_only_function not being available,
|
||||
// not really worth generalizing at this time.
|
||||
@ -1732,16 +1738,6 @@ private:
|
||||
return CachedExtentRef();
|
||||
}
|
||||
}
|
||||
|
||||
template <
|
||||
typename node_key_t,
|
||||
typename node_val_t,
|
||||
typename internal_node_t,
|
||||
typename leaf_node_t,
|
||||
typename pin_t,
|
||||
size_t node_size,
|
||||
bool leaf_has_children>
|
||||
friend class FixedKVBtree;
|
||||
};
|
||||
using CacheRef = std::unique_ptr<Cache>;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user