From: Sage Weil Date: Mon, 13 Jul 2015 14:55:34 +0000 (-0400) Subject: os/FileStore: pass sort_bitwise down to CollectionIndex X-Git-Tag: v9.1.0~346^2~57 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bbd10446a757edebe344e3f3209cda4037dc9600;p=ceph.git os/FileStore: pass sort_bitwise down to CollectionIndex Signed-off-by: Sage Weil --- diff --git a/src/os/CollectionIndex.h b/src/os/CollectionIndex.h index b08e5b4e304..6af6d773538 100644 --- a/src/os/CollectionIndex.h +++ b/src/os/CollectionIndex.h @@ -167,6 +167,7 @@ protected: virtual int collection_list_partial( const ghobject_t &start, ///< [in] object at which to start const ghobject_t &end, ///< [in] list only objects < end + bool sort_bitwise, ///< [in] use bitwise sort int max_count, ///< [in] return at most max_count objects vector *ls, ///< [out] Listed objects ghobject_t *next ///< [out] Next object to list diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index d225cf3f504..aace0544f54 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -4642,7 +4642,8 @@ bool FileStore::collection_empty(coll_t c) tracepoint(objectstore, collection_empty_exit, ret); return ret; } -int FileStore::collection_list(coll_t c, ghobject_t start, ghobject_t end, int max, +int FileStore::collection_list(coll_t c, ghobject_t start, ghobject_t end, + bool sort_bitwise, int max, vector *ls, ghobject_t *next) { if (start.is_max()) @@ -4682,7 +4683,7 @@ int FileStore::collection_list(coll_t c, ghobject_t start, ghobject_t end, int m if (start < sep) { dout(10) << __func__ << " first checking temp pool" << dendl; coll_t temp = c.get_temp(); - int r = collection_list(temp, start, end, max, ls, next); + int r = collection_list(temp, start, end, sort_bitwise, max, ls, next); if (r < 0) return r; if (*next != ghobject_t::get_max()) @@ -4703,7 +4704,7 @@ int FileStore::collection_list(coll_t c, ghobject_t start, ghobject_t end, int m assert(NULL != index.index); RWLock::RLocker l((index.index)->access_lock); - r = index->collection_list_partial(start, end, max, ls, next); + r = index->collection_list_partial(start, end, sort_bitwise, max, ls, next); if (r < 0) { assert(!m_filestore_fail_eio || r != -EIO); diff --git a/src/os/FileStore.h b/src/os/FileStore.h index 1fe62aac660..95882d3c7f3 100644 --- a/src/os/FileStore.h +++ b/src/os/FileStore.h @@ -617,7 +617,8 @@ public: const SequencerPosition &spos); // collections - int collection_list(coll_t c, ghobject_t start, ghobject_t end, int max, + int collection_list(coll_t c, ghobject_t start, ghobject_t end, + bool sort_bitwise, int max, vector *ls, ghobject_t *next); int list_collections(vector& ls); int list_collections(vector& ls, bool include_temp);