From 4a9c8e07b5537bfd109b275ec64507c259e5f318 Mon Sep 17 00:00:00 2001 From: Igor Fedotov Date: Tue, 18 Oct 2016 13:04:43 +0000 Subject: [PATCH] os/kstore: uniform Collection implementation with BlueStore one Signed-off-by:Igor Fedotov --- src/os/kstore/KStore.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/os/kstore/KStore.h b/src/os/kstore/KStore.h index 103a45a7b74f1..f04a3f16aa081 100644 --- a/src/os/kstore/KStore.h +++ b/src/os/kstore/KStore.h @@ -126,7 +126,7 @@ public: int trim(int max=-1); }; - struct Collection { + struct Collection : public CollectionImpl { KStore *store; coll_t cid; kstore_cnode_t cnode; @@ -138,6 +138,10 @@ public: OnodeRef get_onode(const ghobject_t& oid, bool create); + const coll_t &get_cid() override { + return cid; + } + bool contains(const ghobject_t& oid) { if (cid.is_meta()) return oid.hobj.pool == -1; @@ -151,7 +155,7 @@ public: Collection(KStore *ns, coll_t c); }; - typedef ceph::shared_ptr CollectionRef; + typedef boost::intrusive_ptr CollectionRef; class OmapIteratorImpl : public ObjectMap::ObjectMapIteratorImpl { CollectionRef c; -- 2.39.5