From 4d6ee79a04363385261f9a798db3b34d1b83d6c8 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 23 Apr 2015 13:55:55 -0700 Subject: [PATCH] os/ObjectStore: kill hobject_t convenience wrappers These are dangerous and no longer needed. Signed-off-by: Sage Weil --- src/os/ObjectStore.cc | 46 ------------------------------------------- src/os/ObjectStore.h | 10 ---------- 2 files changed, 56 deletions(-) diff --git a/src/os/ObjectStore.cc b/src/os/ObjectStore.cc index 5869be535c024..717df74ee3c76 100644 --- a/src/os/ObjectStore.cc +++ b/src/os/ObjectStore.cc @@ -113,49 +113,3 @@ int ObjectStore::queue_transactions( return queue_transactions(osr, tls, _onreadable, _oncommit, onreadable_sync, op); } - -int ObjectStore::collection_list(coll_t c, vector& o) -{ - vector go; - int ret = collection_list(c, go); - if (ret == 0) { - o.reserve(go.size()); - for (vector::iterator i = go.begin(); i != go.end() ; ++i) - o.push_back(i->hobj); - } - return ret; -} - -int ObjectStore::collection_list_partial(coll_t c, hobject_t start, - int min, int max, snapid_t snap, - vector *ls, hobject_t *next) -{ - vector go; - ghobject_t gnext, gstart(start); - int ret = collection_list_partial(c, gstart, min, max, snap, &go, &gnext); - if (ret == 0) { - *next = gnext.hobj; - ls->reserve(go.size()); - for (vector::iterator i = go.begin(); i != go.end() ; ++i) - ls->push_back(i->hobj); - } - return ret; -} - -int ObjectStore::collection_list_range(coll_t c, hobject_t start, hobject_t end, - snapid_t seq, vector *ls) -{ - vector go; - // Starts with the smallest shard id and generation to - // make sure the result list has the marker object - ghobject_t gstart(start, 0, shard_id_t(0)); - // Exclusive end, choose the smallest end ghobject - ghobject_t gend(end, 0, shard_id_t(0)); - int ret = collection_list_range(c, gstart, gend, seq, &go); - if (ret == 0) { - ls->reserve(go.size()); - for (vector::iterator i = go.begin(); i != go.end() ; ++i) - ls->push_back(i->hobj); - } - return ret; -} diff --git a/src/os/ObjectStore.h b/src/os/ObjectStore.h index e7d889c3c1d78..3a14a60f0588b 100644 --- a/src/os/ObjectStore.h +++ b/src/os/ObjectStore.h @@ -2066,16 +2066,6 @@ public: virtual int collection_list_range(coll_t c, ghobject_t start, ghobject_t end, snapid_t seq, vector *ls) = 0; - //TODO: Remove - int collection_list(coll_t c, vector& o); - - int collection_list_partial(coll_t c, hobject_t start, - int min, int max, snapid_t snap, - vector *ls, hobject_t *next); - - int collection_list_range(coll_t c, hobject_t start, hobject_t end, - snapid_t seq, vector *ls); - /// OMAP /// Get omap contents virtual int omap_get( -- 2.39.5