diff --git a/src/crimson/os/seastore/btree/fixed_kv_btree.h b/src/crimson/os/seastore/btree/fixed_kv_btree.h index b91a4e2d07b..2d758ef4be2 100644 --- a/src/crimson/os/seastore/btree/fixed_kv_btree.h +++ b/src/crimson/os/seastore/btree/fixed_kv_btree.h @@ -579,12 +579,12 @@ public: if constexpr ( std::is_base_of_v) { - 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); } } diff --git a/src/crimson/os/seastore/cache.h b/src/crimson/os/seastore/cache.h index 75463f465fe..5093c79b81c 100644 --- a/src/crimson/os/seastore/cache.h +++ b/src/crimson/os/seastore/cache.h @@ -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;