]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/ObjectStore: pass by ref to collection_list
authorSage Weil <sage@redhat.com>
Mon, 28 Nov 2016 19:21:27 +0000 (14:21 -0500)
committerSage Weil <sage@redhat.com>
Mon, 28 Nov 2016 19:29:12 +0000 (14:29 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/ObjectStore.h
src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h
src/os/filestore/FileStore.cc
src/os/filestore/FileStore.h
src/os/kstore/KStore.cc
src/os/kstore/KStore.h
src/os/memstore/MemStore.cc
src/os/memstore/MemStore.h

index 51a90950bae6cfddc0d00d7cc08db7cbf2453447..87cc5aca3d5ea08522bf5a32d759cf56a2774183 100644 (file)
@@ -1829,11 +1829,12 @@ public:
    * @param next [out] next item sorts >= this value
    * @return zero on success, or negative error
    */
-  virtual int collection_list(const coll_t& c, ghobject_t start, ghobject_t end,
+  virtual int collection_list(const coll_t& c,
+                             const ghobject_t& start, const ghobject_t& end,
                              bool sort_bitwise, int max,
                              vector<ghobject_t> *ls, ghobject_t *next) = 0;
   virtual int collection_list(CollectionHandle &c,
-                             ghobject_t start, ghobject_t end,
+                             const ghobject_t& start, const ghobject_t& end,
                              bool sort_bitwise, int max,
                              vector<ghobject_t> *ls, ghobject_t *next) {
     return collection_list(c->get_cid(), start, end, sort_bitwise, max, ls, next);
index 57ec5df1501359eba6071a8be79a3695a824f6d5..5a6998a122f15bda5b4309e3272c134e05d0e68f 100644 (file)
@@ -5486,7 +5486,7 @@ int BlueStore::collection_bits(const coll_t& cid)
 }
 
 int BlueStore::collection_list(
-  const coll_t& cid, ghobject_t start, ghobject_t end,
+  const coll_t& cid, const ghobject_t& start, const ghobject_t& end,
   bool sort_bitwise, int max,
   vector<ghobject_t> *ls, ghobject_t *pnext)
 {
@@ -5497,7 +5497,7 @@ int BlueStore::collection_list(
 }
 
 int BlueStore::collection_list(
-  CollectionHandle &c_, ghobject_t start, ghobject_t end,
+  CollectionHandle &c_, const ghobject_t& start, const ghobject_t& end,
   bool sort_bitwise, int max,
   vector<ghobject_t> *ls, ghobject_t *pnext)
 {
index 77dd98a66b6c1b736afd71f1419b13cd5eb7e664..bfac18f44bd3151985e5d6eb2b207a3da9b03e2f 100644 (file)
@@ -1817,10 +1817,14 @@ public:
   int collection_empty(const coll_t& c, bool *empty) override;
   int collection_bits(const coll_t& c) override;
 
-  int collection_list(const coll_t& cid, ghobject_t start, ghobject_t end,
+  int collection_list(const coll_t& cid,
+                     const ghobject_t& start,
+                     const ghobject_t& end,
                      bool sort_bitwise, int max,
                      vector<ghobject_t> *ls, ghobject_t *next) override;
-  int collection_list(CollectionHandle &c, ghobject_t start, ghobject_t end,
+  int collection_list(CollectionHandle &c,
+                     const ghobject_t& start,
+                     const ghobject_t& end,
                      bool sort_bitwise, int max,
                      vector<ghobject_t> *ls, ghobject_t *next) override;
 
index 5be2c2c3026261e2188501516b715708d4107ea8..d54634617dae4d76c1599251536bef428e6396c0 100644 (file)
@@ -4739,10 +4739,13 @@ int FileStore::collection_empty(const coll_t& c, bool *empty)
   tracepoint(objectstore, collection_empty_exit, *empty);
   return 0;
 }
-int FileStore::collection_list(const coll_t& c, ghobject_t start, ghobject_t end,
+int FileStore::collection_list(const coll_t& c,
+                              const ghobject_t& orig_start,
+                              const ghobject_t& end,
                               bool sort_bitwise, int max,
                               vector<ghobject_t> *ls, ghobject_t *next)
 {
+  ghobject_t start = orig_start;
   if (start.is_max())
     return 0;
 
index 9b88c28fbe9550d9e76e1487bf41035020302c0e..300d6fd49136ee44a49b1eb49b1102c8224b0655 100644 (file)
@@ -648,7 +648,8 @@ public:
 
   // collections
   using ObjectStore::collection_list;
-  int collection_list(const coll_t& c, ghobject_t start, ghobject_t end,
+  int collection_list(const coll_t& c,
+                     const ghobject_t& start, const ghobject_t& end,
                      bool sort_bitwise, int max,
                      vector<ghobject_t> *ls, ghobject_t *next);
   int list_collections(vector<coll_t>& ls);
index 57d2c201735375f274b00a5a05b1f4e3346cc779..625e4c0cd36d432668b50cb15e53831fe1dd8ef8 100755 (executable)
@@ -1402,7 +1402,7 @@ int KStore::collection_empty(const coll_t& cid, bool *empty)
 }
 
 int KStore::collection_list(
-  const coll_t& cid, ghobject_t start, ghobject_t end,
+  const coll_t& cid, const ghobject_t& start, const ghobject_t& end,
   bool sort_bitwise, int max,
   vector<ghobject_t> *ls, ghobject_t *pnext)
 {
@@ -1413,7 +1413,7 @@ int KStore::collection_list(
 }
 
 int KStore::collection_list(
-  CollectionHandle &c_, ghobject_t start, ghobject_t end,
+  CollectionHandle &c_, const ghobject_t& start, const ghobject_t& end,
   bool sort_bitwise, int max,
   vector<ghobject_t> *ls, ghobject_t *pnext)
 
@@ -1435,7 +1435,7 @@ int KStore::collection_list(
 }
 
 int KStore::_collection_list(
-  Collection* c, ghobject_t start, ghobject_t end,
+  Collection* c, const ghobject_t& start, const ghobject_t& end,
   bool sort_bitwise, int max,
   vector<ghobject_t> *ls, ghobject_t *pnext)
 {
index aff25b70aa0a8ff4efb483efaa44c94f6953daa4..dac579d302ff2d86f1ffb095ca61940d3e148b14 100644 (file)
@@ -393,7 +393,8 @@ private:
                        uint64_t offset, bufferlist& bl);
   void _do_remove_stripe(TransContext *txc, OnodeRef o, uint64_t offset);
 
-  int _collection_list(Collection *c, ghobject_t start, ghobject_t end,
+  int _collection_list(
+    Collection *c, const ghobject_t& start, const ghobject_t& end,
     bool sort_bitwise, int max, vector<ghobject_t> *ls, ghobject_t *next);
 
 public:
@@ -471,12 +472,14 @@ public:
   bool collection_exists(const coll_t& c);
   int collection_empty(const coll_t& c, bool *empty);
 
-  int collection_list(const coll_t& cid, ghobject_t start, ghobject_t end,
-             bool sort_bitwise, int max,
-             vector<ghobject_t> *ls, ghobject_t *next) override;
-  int collection_list(CollectionHandle &c, ghobject_t start, ghobject_t end,
-             bool sort_bitwise, int max,
-             vector<ghobject_t> *ls, ghobject_t *next) override;
+  int collection_list(
+    const coll_t& cid, const ghobject_t& start, const ghobject_t& end,
+    bool sort_bitwise, int max,
+    vector<ghobject_t> *ls, ghobject_t *next) override;
+  int collection_list(
+    CollectionHandle &c, const ghobject_t& start, const ghobject_t& end,
+    bool sort_bitwise, int max,
+    vector<ghobject_t> *ls, ghobject_t *next) override;
 
   using ObjectStore::omap_get;
   int omap_get(
index c5f57eb327d7686e3683e5bdde104d745a9d74c8..fd1c1f2ceb359c9e3c1e548e5da5ab2ac92989fa 100644 (file)
@@ -459,7 +459,9 @@ int MemStore::collection_empty(const coll_t& cid, bool *empty)
   return 0;
 }
 
-int MemStore::collection_list(const coll_t& cid, ghobject_t start, ghobject_t end,
+int MemStore::collection_list(const coll_t& cid,
+                             const ghobject_t& start,
+                             const ghobject_t& end,
                              bool sort_bitwise, int max,
                              vector<ghobject_t> *ls, ghobject_t *next)
 {
index d11ea3548651226e9225bb0bf3a3ea3f3940038b..5401c9e9d4bdd880b5bd28668151035ad305dc3b 100644 (file)
@@ -326,7 +326,8 @@ public:
   bool collection_exists(const coll_t& c) override;
   int collection_empty(const coll_t& c, bool *empty) override;
   using ObjectStore::collection_list;
-  int collection_list(const coll_t& cid, ghobject_t start, ghobject_t end,
+  int collection_list(const coll_t& cid,
+                     const ghobject_t& start, const ghobject_t& end,
                      bool sort_bitwise, int max,
                      vector<ghobject_t> *ls, ghobject_t *next) override;