From: Sage Weil Date: Wed, 27 Jan 2016 19:45:11 +0000 (-0500) Subject: Merge pull request #7223 from liewegas/wip-collection-handles X-Git-Tag: v10.0.4~153 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2e52a8b17c348bb3356eb76a8a0f6ef6efbe5bd3;p=ceph.git Merge pull request #7223 from liewegas/wip-collection-handles osd: collection handles Reviewed-by: Casey Bodley --- 2e52a8b17c348bb3356eb76a8a0f6ef6efbe5bd3 diff --cc src/os/ObjectStore.h index bc5126d0ac8f,34080c9fc2a3..fa92061677ae --- a/src/os/ObjectStore.h +++ b/src/os/ObjectStore.h @@@ -2172,8 -2176,13 +2251,14 @@@ public virtual int collection_list(coll_t c, ghobject_t start, ghobject_t end, bool sort_bitwise, int max, vector *ls, ghobject_t *next) = 0; + virtual int collection_list(CollectionHandle &c, + ghobject_t start, ghobject_t end, + bool sort_bitwise, int max, + vector *ls, ghobject_t *next) { + return collection_list(c->get_cid(), start, end, sort_bitwise, max, ls, next); + } + /// OMAP /// Get omap contents virtual int omap_get( diff --cc src/os/bluestore/BlueStore.h index 56ca712ade7e,3740fdbb05fe..a978da0eb972 --- a/src/os/bluestore/BlueStore.h +++ b/src/os/bluestore/BlueStore.h @@@ -639,14 -656,27 +659,28 @@@ public bufferlist& bl, uint32_t op_flags = 0); - int fiemap(coll_t cid, const ghobject_t& oid, uint64_t offset, size_t len, bufferlist& bl); - int getattr(coll_t cid, const ghobject_t& oid, const char *name, bufferptr& value); - int getattrs(coll_t cid, const ghobject_t& oid, map& aset); + int fiemap(coll_t cid, const ghobject_t& oid, + uint64_t offset, size_t len, bufferlist& bl) override; + int fiemap(CollectionHandle &c, const ghobject_t& oid, + uint64_t offset, size_t len, bufferlist& bl) override; + + int getattr(coll_t cid, const ghobject_t& oid, const char *name, + bufferptr& value) override; + int getattr(CollectionHandle &c, const ghobject_t& oid, const char *name, + bufferptr& value) override; + + int getattrs(coll_t cid, const ghobject_t& oid, + map& aset) override; + int getattrs(CollectionHandle &c, const ghobject_t& oid, + map& aset) override; + + int list_collections(vector& ls) override; + + CollectionHandle open_collection(const coll_t &c) override; - int list_collections(vector& ls); bool collection_exists(coll_t c); bool collection_empty(coll_t c); + int collection_bits(coll_t c); int collection_list(coll_t cid, ghobject_t start, ghobject_t end, bool sort_bitwise, int max,