From: Igor Fedotov Date: Tue, 18 Oct 2016 13:04:43 +0000 (+0000) Subject: os/kstore: uniform Collection implementation with BlueStore one X-Git-Tag: v11.1.0~606^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4a9c8e07b5537bfd109b275ec64507c259e5f318;p=ceph.git os/kstore: uniform Collection implementation with BlueStore one Signed-off-by:Igor Fedotov --- diff --git a/src/os/kstore/KStore.h b/src/os/kstore/KStore.h index 103a45a7b74f..f04a3f16aa08 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;