]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os: drop snapid_t arg to collection_list
authorSage Weil <sage@redhat.com>
Wed, 29 Apr 2015 23:44:59 +0000 (16:44 -0700)
committerSage Weil <sage@redhat.com>
Fri, 7 Aug 2015 12:45:34 +0000 (08:45 -0400)
All this does is filter out objects with old snapids, but this can be
just as easily done in the one caller that specifies a non-zero value
(PGLS and PGNLS), which in fact already do that filtering.

Signed-off-by: Sage Weil <sage@redhat.com>
21 files changed:
src/os/CollectionIndex.h
src/os/FileStore.cc
src/os/FileStore.h
src/os/HashIndex.cc
src/os/HashIndex.h
src/os/KeyValueStore.cc
src/os/KeyValueStore.h
src/os/LFNIndex.cc
src/os/LFNIndex.h
src/os/MemStore.cc
src/os/MemStore.h
src/os/ObjectStore.h
src/osd/OSD.cc
src/osd/PG.cc
src/osd/PGBackend.cc
src/osd/PGBackend.h
src/osd/ReplicatedPG.cc
src/test/objectstore/FileStoreDiff.cc
src/test/objectstore/store_test.cc
src/test/objectstore/workload_generator.cc
src/tools/ceph_objectstore_tool.cc

index 093acc0aabdc43ee003cc0fbf9fc56095e83942f..b08e5b4e304fb5b9d95ab19b81cd26baf6fc269b 100644 (file)
@@ -168,7 +168,6 @@ protected:
     const ghobject_t &start, ///< [in] object at which to start
     const ghobject_t &end,    ///< [in] list only objects < end
     int max_count,          ///< [in] return at most max_count objects
-    snapid_t seq,           ///< [in] list only objects with snap >= seq
     vector<ghobject_t> *ls,  ///< [out] Listed objects
     ghobject_t *next         ///< [out] Next object to list
     ) = 0;
index 6a85cd90cc35ce7891d10471c817c90f9199af67..9d83f15ff0ce263129845dec7356cabd61c2be0c 100644 (file)
@@ -4484,7 +4484,7 @@ int FileStore::_collection_remove_recursive(const coll_t &cid,
   vector<ghobject_t> objects;
   ghobject_t max;
   while (!max.is_max()) {
-    r = collection_list(cid, max, ghobject_t::get_max(), 300, 0, &objects, &max);
+    r = collection_list(cid, max, ghobject_t::get_max(), 300, &objects, &max);
     if (r < 0)
       return r;
     for (vector<ghobject_t>::iterator i = objects.begin();
@@ -4631,7 +4631,7 @@ bool FileStore::collection_empty(coll_t c)
 
   vector<ghobject_t> ls;
   collection_list_handle_t handle;
-  r = index->collection_list_partial(ghobject_t(), ghobject_t::get_max(), 1, 0, &ls, NULL);
+  r = index->collection_list_partial(ghobject_t(), ghobject_t::get_max(), 1, &ls, NULL);
   if (r < 0) {
     assert(!m_filestore_fail_eio || r != -EIO);
     return false;
@@ -4641,7 +4641,7 @@ bool FileStore::collection_empty(coll_t c)
   return ret;
 }
 int FileStore::collection_list(coll_t c, ghobject_t start, ghobject_t end, int max,
-                              snapid_t seq, vector<ghobject_t> *ls, ghobject_t *next)
+                              vector<ghobject_t> *ls, ghobject_t *next)
 {
   if (start.is_max())
     return 0;
@@ -4680,7 +4680,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, seq, ls, next);
+      int r = collection_list(temp, start, end, max, ls, next);
       if (r < 0)
        return r;
       if (*next != ghobject_t::get_max())
@@ -4701,7 +4701,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, seq, ls, next);
+  r = index->collection_list_partial(start, end, max, ls, next);
 
   if (r < 0) {
     assert(!m_filestore_fail_eio || r != -EIO);
@@ -5302,7 +5302,7 @@ int FileStore::_split_collection(coll_t cid,
       collection_list(
        cid,
        next, ghobject_t::get_max(),
-       get_ideal_list_max(), 0,
+       get_ideal_list_max(),
        &objects,
        &next);
       if (objects.empty())
@@ -5321,7 +5321,7 @@ int FileStore::_split_collection(coll_t cid,
       collection_list(
        dest,
        next, ghobject_t::get_max(),
-       get_ideal_list_max(), 0,
+       get_ideal_list_max(),
        &objects,
        &next);
       if (objects.empty())
index 7f0bbdb09ce26e932d99366fb12b23ccc56ee92e..1fe62aac660f0519a7a9a2a32d5927b3ab22a352 100644 (file)
@@ -618,7 +618,7 @@ public:
 
   // collections
   int collection_list(coll_t c, ghobject_t start, ghobject_t end, int max,
-                                     snapid_t seq, vector<ghobject_t> *ls, ghobject_t *next);
+                     vector<ghobject_t> *ls, ghobject_t *next);
   int list_collections(vector<coll_t>& ls);
   int list_collections(vector<coll_t>& ls, bool include_temp);
   int collection_version_current(coll_t c, uint32_t *version);
index e791d6614ec9f5a640b179f0444c3b8bfbf8edd0..e18695ca428580f4e16596c773b71deef4a578e4 100644 (file)
@@ -323,7 +323,6 @@ int HashIndex::_lookup(const ghobject_t &oid,
 int HashIndex::_collection_list_partial(const ghobject_t &start,
                                        const ghobject_t &end,
                                        int max_count,
-                                       snapid_t seq,
                                        vector<ghobject_t> *ls,
                                        ghobject_t *next) {
   vector<string> path;
@@ -331,8 +330,8 @@ int HashIndex::_collection_list_partial(const ghobject_t &start,
   if (!next)
     next = &_next;
   *next = start;
-  dout(20) << "_collection_list_partial start:" << start << " end:" << end << "-" << max_count << " ls.size " << ls->size() << dendl;
-  return list_by_hash(path, end, max_count, seq, next, ls);
+  dout(20) << __func__ << " start:" << start << " end:" << end << "-" << max_count << " ls.size " << ls->size() << dendl;
+  return list_by_hash(path, end, max_count, next, ls);
 }
 
 int HashIndex::prep_delete() {
@@ -764,7 +763,6 @@ uint32_t HashIndex::hash_prefix_to_hash(string prefix) {
 int HashIndex::get_path_contents_by_hash(const vector<string> &path,
                                         const string *lower_bound,
                                         const ghobject_t *next_object,
-                                        const snapid_t *seq,
                                         set<string> *hash_prefixes,
                                         set<pair<string, ghobject_t> > *objects) {
   set<string> subdirs;
@@ -787,8 +785,6 @@ int HashIndex::get_path_contents_by_hash(const vector<string> &path,
       continue;
     if (next_object && i->second < *next_object)
       continue;
-    if (seq && i->second.hobj.snap < *seq)
-      continue;
     hash_prefixes->insert(hash_prefix);
     objects->insert(pair<string, ghobject_t>(hash_prefix, i->second));
   }
@@ -813,7 +809,6 @@ int HashIndex::get_path_contents_by_hash(const vector<string> &path,
 int HashIndex::list_by_hash(const vector<string> &path,
                            ghobject_t end,
                            int max_count,
-                           snapid_t seq,
                            ghobject_t *next,
                            vector<ghobject_t> *out) {
   assert(out);
@@ -824,7 +819,6 @@ int HashIndex::list_by_hash(const vector<string> &path,
   int r = get_path_contents_by_hash(path,
                                    NULL,
                                    next,
-                                   &seq,
                                    &hash_prefixes,
                                    &objects);
   if (r < 0)
@@ -843,7 +837,6 @@ int HashIndex::list_by_hash(const vector<string> &path,
       r = list_by_hash(next_path,
                       end,
                       max_count,
-                      seq,
                       &next_recurse,
                       out);
 
index 0723a85114165275a918319d644c520bfc372462..7c52ca5f30cd5294457292d7325a6d52fceea3b5 100644 (file)
@@ -192,7 +192,6 @@ protected:
     const ghobject_t &start,
     const ghobject_t &end,
     int max_count,
-    snapid_t seq,
     vector<ghobject_t> *ls,
     ghobject_t *next
     );
@@ -355,7 +354,6 @@ private:
     const vector<string> &path,            /// [in] Path to list
     const string *lower_bound,             /// [in] list > *lower_bound
     const ghobject_t *next_object,          /// [in] list > *next_object
-    const snapid_t *seq,                   /// [in] list >= *seq
     set<string> *hash_prefixes,            /// [out] prefixes in dir
     set<pair<string, ghobject_t> > *objects /// [out] objects
     );
@@ -365,7 +363,6 @@ private:
     const vector<string> &path, /// [in] Path to list
     ghobject_t end,             /// [in] List only objects < end
     int max_count,              /// [in] List at most max_count
-    snapid_t seq,               /// [in] list only objects where snap >= seq
     ghobject_t *next,            /// [in,out] List objects >= *next
     vector<ghobject_t> *out      /// [out] Listed objects
     ); ///< @return Error Code, 0 on success
index e943c192a028e781df0fb2b835f35587cb684ba7..4b3cf71579b05a516305d78f3c0885c2f0bac0ce 100644 (file)
@@ -2444,7 +2444,7 @@ int KeyValueStore::_collection_remove_recursive(const coll_t &cid,
   vector<ghobject_t> objects;
   ghobject_t max;
   while (!max.is_max()) {
-    r = collection_list(cid, max, ghobject_t::get_max(), 300, 0, &objects, &max);
+    r = collection_list(cid, max, ghobject_t::get_max(), 300, &objects, &max);
     if (r < 0)
       goto out;
 
@@ -2496,7 +2496,7 @@ bool KeyValueStore::collection_empty(coll_t c)
 }
 
 int KeyValueStore::collection_list(coll_t c, ghobject_t start,
-                                  ghobject_t end, int max, snapid_t seq,
+                                  ghobject_t end, int max,
                                   vector<ghobject_t> *ls, ghobject_t *next)
 {
   if ( max < 0)
@@ -2790,7 +2790,7 @@ int KeyValueStore::_split_collection(coll_t cid, uint32_t bits, uint32_t rem,
     int move_size = 0;
     while (1) {
       collection_list(cid, current, ghobject_t::get_max(),
-                     get_ideal_list_max(), 0, &objects, &next);
+                     get_ideal_list_max(), &objects, &next);
 
       dout(20) << __func__ << cid << "objects size: " << objects.size()
               << dendl;
@@ -2821,7 +2821,7 @@ int KeyValueStore::_split_collection(coll_t cid, uint32_t bits, uint32_t rem,
     ghobject_t next;
     while (1) {
       collection_list(cid, next, ghobject_t::get_max(),
-                     get_ideal_list_max(), 0, &objects, &next);
+                     get_ideal_list_max(), &objects, &next);
       if (objects.empty())
         break;
 
@@ -2837,7 +2837,7 @@ int KeyValueStore::_split_collection(coll_t cid, uint32_t bits, uint32_t rem,
     next = ghobject_t();
     while (1) {
       collection_list(dest, next, ghobject_t::get_max(),
-                     get_ideal_list_max(), 0, &objects, &next);
+                     get_ideal_list_max(), &objects, &next);
       if (objects.empty())
         break;
 
index de72c55083a82fa8d7fdfe4090276ace5b89c997..7220cc35013cf1e585fbf0bad68cbb407a4ed578 100644 (file)
@@ -619,7 +619,7 @@ class KeyValueStore : public ObjectStore,
   bool collection_exists(coll_t c);
   bool collection_empty(coll_t c);
   int collection_list(coll_t c, ghobject_t start, ghobject_t end,
-                     int max, snapid_t snap,
+                     int max,
                      vector<ghobject_t> *ls, ghobject_t *next);
   int collection_version_current(coll_t c, uint32_t *version);
 
index 06dd161fedb2af92b398430dcba7a2c943e1fd9e..beb8756d311e4a4499937bd5db141cf374ad90a8 100644 (file)
@@ -152,11 +152,10 @@ int LFNIndex::pre_hash_collection(uint32_t pg_num, uint64_t expected_num_objs)
 int LFNIndex::collection_list_partial(const ghobject_t &start,
                                      const ghobject_t &end,
                                      int max_count,
-                                     snapid_t seq,
                                      vector<ghobject_t> *ls,
                                      ghobject_t *next)
 {
-  return _collection_list_partial(start, end, max_count, seq, ls, next);
+  return _collection_list_partial(start, end, max_count, ls, next);
 }
 
 /* Derived class utility methods */
index a754477fafaeacce6c31e889cee3fec792e2e418..5dd512115516cd427ccc63eaf42b386a76f7543a 100644 (file)
@@ -189,7 +189,6 @@ public:
     const ghobject_t &start,
     const ghobject_t &end,
     int max_count,
-    snapid_t seq,
     vector<ghobject_t> *ls,
     ghobject_t *next
     );
@@ -250,7 +249,6 @@ protected:
     const ghobject_t &start,
     const ghobject_t &end,
     int max_count,
-    snapid_t seq,
     vector<ghobject_t> *ls,
     ghobject_t *next
     ) = 0;
index 8bfd0e80219f9b89719d0df2dbc2b26335e40c71..c952e32968d06d8cb09343f09856b2c0a602e003 100644 (file)
@@ -422,7 +422,7 @@ bool MemStore::collection_empty(coll_t cid)
 }
 
 int MemStore::collection_list(coll_t cid, ghobject_t start, ghobject_t end,
-                             int max, snapid_t snap,
+                             int max,
                              vector<ghobject_t> *ls, ghobject_t *next)
 {
   CollectionRef c = get_collection(cid);
index 27839696683115a2aeecdd12b5a14d89239e8a5b..5233a1564499e178935b7339947c4f689573c9e2 100644 (file)
@@ -307,7 +307,7 @@ public:
   bool collection_exists(coll_t c);
   bool collection_empty(coll_t c);
   int collection_list(coll_t cid, ghobject_t start, ghobject_t end,
-                     int max, snapid_t snap,
+                     int max,
                      vector<ghobject_t> *ls, ghobject_t *next);
 
   int omap_get(
index 6da0e3a4ea7d68861b2a8121e62d18f145c6d46f..e1e4a80bbb7cda47f546af51a3ef39509f552b12 100644 (file)
@@ -2041,7 +2041,7 @@ public:
    * @return zero on success, or negative error
    */
   virtual int collection_list(coll_t c, ghobject_t start, ghobject_t end, int max,
-                             snapid_t seq, vector<ghobject_t> *ls, ghobject_t *next) = 0;
+                             vector<ghobject_t> *ls, ghobject_t *next) = 0;
 
   /// OMAP
   /// Get omap contents
index 787eb4d082133413e05fdebc113c807e3c0d6a5f..acbfcacf0bce23af11ddc8db7645720fa50f537e 100644 (file)
@@ -2508,7 +2508,7 @@ void OSD::clear_temp_objects()
       vector<ghobject_t> objects;
       store->collection_list(*p, next, ghobject_t::get_max(),
                             store->get_ideal_list_max(),
-                            0, &objects, &next);
+                            &objects, &next);
       if (objects.empty())
        break;
       vector<ghobject_t>::iterator q;
@@ -2546,7 +2546,7 @@ void OSD::recursive_remove_collection(ObjectStore *store, spg_t pgid, coll_t tmp
   SnapMapper mapper(&driver, 0, 0, 0, pgid.shard);
 
   vector<ghobject_t> objects;
-  store->collection_list(tmp, ghobject_t(), ghobject_t::get_max(), INT_MAX, 0, &objects, 0);
+  store->collection_list(tmp, ghobject_t(), ghobject_t::get_max(), INT_MAX, &objects, 0);
 
   // delete them.
   unsigned removed = 0;
@@ -4231,7 +4231,6 @@ bool remove_dir(
     next,
     ghobject_t::get_max(),
     store->get_ideal_list_max(),
-    0,
     &olist,
     &next);
   for (vector<ghobject_t>::iterator i = olist.begin();
index 8b17288c6d1c8e7029c11fc2f8230874ac1a2c4e..de15e95d2152ce7b10b0e888e067ec930e4f03ed 100644 (file)
@@ -3893,7 +3893,6 @@ void PG::chunky_scrub(ThreadPool::TPHandle &handle)
              start,
              cct->_conf->osd_scrub_chunk_min,
              cct->_conf->osd_scrub_chunk_max,
-             0,
              &objects,
              &candidate_end);
             assert(ret >= 0);
index 2937a988acfee85dfa2564d6a0df7e5dac4bceb3..3a51fb7d0eb416e11f31be7aa68fa8e596fba086 100644 (file)
@@ -100,7 +100,6 @@ int PGBackend::objects_list_partial(
   const hobject_t &begin,
   int min,
   int max,
-  snapid_t seq,
   vector<hobject_t> *ls,
   hobject_t *next)
 {
@@ -118,7 +117,6 @@ int PGBackend::objects_list_partial(
       _next,
       ghobject_t::get_max(),
       max - ls->size(),
-      seq,
       &objects,
       &_next);
     if (r != 0)
@@ -153,7 +151,6 @@ int PGBackend::objects_list_range(
     ghobject_t(start, ghobject_t::NO_GEN, get_parent()->whoami_shard().shard),
     ghobject_t(end, ghobject_t::NO_GEN, get_parent()->whoami_shard().shard),
     INT_MAX,
-    seq,
     &objects,
     NULL);
   ls->reserve(objects.size());
index 518fdf4be850b186cf830b0f51f75fd360ff7826..1f54a216336dc941d9165b3cb07a03c8b1fc27b9 100644 (file)
      const hobject_t &begin,
      int min,
      int max,
-     snapid_t seq,
      vector<hobject_t> *ls,
      hobject_t *next);
 
index dd760487c8ef9c503b9e250b7776166a0fdbd7b0..2f39e770591126aad2b46da53bce165cbae81774 100644 (file)
@@ -834,7 +834,6 @@ void ReplicatedPG::do_pg_op(OpRequestRef op)
          current,
          list_size,
          list_size,
-         snapid,
          &sentries,
          &next);
        if (r != 0) {
@@ -992,7 +991,6 @@ void ReplicatedPG::do_pg_op(OpRequestRef op)
          current,
          list_size,
          list_size,
-         snapid,
          &sentries,
          &next);
        if (r != 0) {
@@ -10084,7 +10082,7 @@ void ReplicatedPG::scan_range(
 
   vector<hobject_t> ls;
   ls.reserve(max);
-  int r = pgbackend->objects_list_partial(bi->begin, min, max, 0, &ls, &bi->end);
+  int r = pgbackend->objects_list_partial(bi->begin, min, max, &ls, &bi->end);
   assert(r >= 0);
   dout(10) << " got " << ls.size() << " items, next " << bi->end << dendl;
   dout(20) << ls << dendl;
@@ -10619,7 +10617,6 @@ bool ReplicatedPG::agent_work(int start_max, int agent_flush_quota)
   vector<hobject_t> ls;
   hobject_t next;
   int r = pgbackend->objects_list_partial(agent_state->position, ls_min, ls_max,
-                                         0 /* no filtering by snapid */,
                                          &ls, &next);
   assert(r >= 0);
   dout(20) << __func__ << " got " << ls.size() << " objects" << dendl;
index af56806b7e9d4cef0c8d605e843586bd388e3282..fa53d6017ef3f40f7efaa46af24fc89fb5d47517 100644 (file)
@@ -132,13 +132,13 @@ bool FileStoreDiff::diff_objects(FileStore *a_store, FileStore *b_store, coll_t
 
   int err;
   std::vector<ghobject_t> b_objects, a_objects;
-  err = b_store->collection_list(coll, ghobject_t(), ghobject_t::get_max(), INT_MAX, 0, &b_objects, NULL);
+  err = b_store->collection_list(coll, ghobject_t(), ghobject_t::get_max(), INT_MAX, &b_objects, NULL);
   if (err < 0) {
     dout(0) << "diff_objects list on verify coll " << coll.to_str()
            << " returns " << err << dendl;
     return true;
   }
-  err = a_store->collection_list(coll, ghobject_t(), ghobject_t::get_max(), INT_MAX, 0, &a_objects, NULL);
+  err = a_store->collection_list(coll, ghobject_t(), ghobject_t::get_max(), INT_MAX, &a_objects, NULL);
   if (err < 0) {
     dout(0) << "diff_objects list on store coll " << coll.to_str()
               << " returns " << err << dendl;
index 8d3696da346a0cc237d727f70a96165a0cb24f26..18547de2373b8dea45534409bf48a3d6c0ed6b8d 100644 (file)
@@ -283,7 +283,7 @@ TEST_P(StoreTest, SimpleListTest) {
     ghobject_t next, current;
     while (!next.is_max()) {
       int r = store->collection_list(cid, current, ghobject_t::get_max(), 50,
-                                    0, &objects, &next);
+                                    &objects, &next);
       ASSERT_EQ(r, 0);
       cout << " got " << objects.size() << " next " << next << std::endl;
       for (vector<ghobject_t>::iterator p = objects.begin(); p != objects.end();
@@ -367,7 +367,7 @@ TEST_P(StoreTest, MultipoolListTest) {
     ghobject_t next, current;
     while (!next.is_max()) {
       int r = store->collection_list(cid, current, ghobject_t::get_max(), 50,
-                                    0, &objects, &next);
+                                    &objects, &next);
       ASSERT_EQ(r, 0);
       cout << " got " << objects.size() << " next " << next << std::endl;
       for (vector<ghobject_t>::iterator p = objects.begin(); p != objects.end();
@@ -585,7 +585,7 @@ TEST_P(StoreTest, ManyObjectTest) {
 
   set<ghobject_t> listed;
   vector<ghobject_t> objects;
-  r = store->collection_list(cid, ghobject_t(), ghobject_t::get_max(), INT_MAX, 0, &objects, 0);
+  r = store->collection_list(cid, ghobject_t(), ghobject_t::get_max(), INT_MAX, &objects, 0);
   ASSERT_EQ(r, 0);
 
   cerr << "objects.size() is " << objects.size() << std::endl;
@@ -604,7 +604,6 @@ TEST_P(StoreTest, ManyObjectTest) {
     ghobject_t::get_max(),
     ghobject_t::get_max(),
     60,
-    0,
     &objects,
     &next
     );
@@ -617,7 +616,6 @@ TEST_P(StoreTest, ManyObjectTest) {
     r = store->collection_list(cid, start,
                               ghobject_t::get_max(),
                               60,
-                              0,
                               &objects,
                               &next);
     ASSERT_TRUE(sorted(objects));
@@ -1102,7 +1100,7 @@ public:
     while (1) {
       cerr << "scanning..." << std::endl;
       int r = store->collection_list(cid, current, ghobject_t::get_max(), 100,
-                                    0, &objects, &next);
+                                    &objects, &next);
       ASSERT_EQ(r, 0);
       ASSERT_TRUE(sorted(objects));
       objects_set.insert(objects.begin(), objects.end());
@@ -1117,7 +1115,7 @@ public:
       ASSERT_GT(available_objects.count(*i), (unsigned)0);
     }
 
-    int r = store->collection_list(cid, ghobject_t(), ghobject_t::get_max(), INT_MAX, 0, &objects, 0);
+    int r = store->collection_list(cid, ghobject_t(), ghobject_t::get_max(), INT_MAX, &objects, 0);
     ASSERT_EQ(r, 0);
     objects_set2.insert(objects.begin(), objects.end());
     ASSERT_EQ(objects_set2.size(), available_objects.size());
@@ -1313,7 +1311,7 @@ TEST_P(StoreTest, HashCollisionTest) {
   }
   }
   vector<ghobject_t> objects;
-  r = store->collection_list(cid, ghobject_t(), ghobject_t::get_max(), INT_MAX, 0, &objects, 0);
+  r = store->collection_list(cid, ghobject_t(), ghobject_t::get_max(), INT_MAX, &objects, 0);
   ASSERT_EQ(r, 0);
   set<ghobject_t> listed(objects.begin(), objects.end());
   cerr << "listed.size() is " << listed.size() << " and created.size() is " << created.size() << std::endl;
@@ -1323,7 +1321,7 @@ TEST_P(StoreTest, HashCollisionTest) {
   ghobject_t current, next;
   while (1) {
     r = store->collection_list(cid, current, ghobject_t::get_max(), 60,
-                                      0, &objects, &next);
+                              &objects, &next);
     ASSERT_EQ(r, 0);
     ASSERT_TRUE(sorted(objects));
     for (vector<ghobject_t>::iterator i = objects.begin();
@@ -1408,7 +1406,8 @@ TEST_P(StoreTest, ScrubTest) {
   }
 
   vector<ghobject_t> objects;
-  r = store->collection_list(cid, ghobject_t(), ghobject_t::get_max(), INT_MAX, 0, &objects, 0);
+  r = store->collection_list(cid, ghobject_t(), ghobject_t::get_max(), INT_MAX,
+                            &objects, 0);
   ASSERT_EQ(r, 0);
   set<ghobject_t> listed(objects.begin(), objects.end());
   cerr << "listed.size() is " << listed.size() << " and created.size() is " << created.size() << std::endl;
@@ -1418,7 +1417,7 @@ TEST_P(StoreTest, ScrubTest) {
   ghobject_t current, next;
   while (1) {
     r = store->collection_list(cid, current, ghobject_t::get_max(), 60,
-                              0, &objects, &next);
+                              &objects, &next);
     ASSERT_EQ(r, 0);
     ASSERT_TRUE(sorted(objects));
     for (vector<ghobject_t>::iterator i = objects.begin();
@@ -1706,7 +1705,8 @@ void colsplittest(
 
   ObjectStore::Transaction t;
   vector<ghobject_t> objects;
-  r = store->collection_list(cid, ghobject_t(), ghobject_t::get_max(), INT_MAX, 0, &objects, 0);
+  r = store->collection_list(cid, ghobject_t(), ghobject_t::get_max(), INT_MAX,
+                            &objects, 0);
   ASSERT_EQ(r, 0);
   ASSERT_EQ(objects.size(), num_objects);
   for (vector<ghobject_t>::iterator i = objects.begin();
@@ -1717,7 +1717,8 @@ void colsplittest(
   }
 
   objects.clear();
-  r = store->collection_list(tid, ghobject_t(), ghobject_t::get_max(), INT_MAX, 0, &objects, 0);
+  r = store->collection_list(tid, ghobject_t(), ghobject_t::get_max(), INT_MAX,
+                            &objects, 0);
   ASSERT_EQ(r, 0);
   ASSERT_EQ(objects.size(), num_objects);
   for (vector<ghobject_t>::iterator i = objects.begin();
@@ -1925,7 +1926,8 @@ TEST_P(StoreTest, BigRGWObjectName) {
 
   {
     vector<ghobject_t> objects;
-    r = store->collection_list(cid, ghobject_t(), ghobject_t::get_max(), INT_MAX, 0, &objects, 0);
+    r = store->collection_list(cid, ghobject_t(), ghobject_t::get_max(), INT_MAX,
+                              &objects, 0);
     ASSERT_EQ(r, 0);
     ASSERT_EQ(objects.size(), 1u);
     ASSERT_EQ(objects[0], oid2);
index ae0a83423d9134dc45081f31a8e4dd8e7ecb329d..18f1eb71c845782d84029978dc5ed6860aeebf21 100644 (file)
@@ -353,7 +353,7 @@ void WorkloadGenerator::do_destroy_collection(ObjectStore::Transaction *t,
   m_nr_runs.set(0);
   entry->m_osr.flush();
   vector<ghobject_t> ls;
-  m_store->collection_list(entry->m_coll, ghobject_t(), ghobject_t::get_max(), INT_MAX, 0, &ls, NULL);
+  m_store->collection_list(entry->m_coll, ghobject_t(), ghobject_t::get_max(), INT_MAX, &ls, NULL);
   dout(2) << __func__ << " coll " << entry->m_coll
       << " (" << ls.size() << " objects)" << dendl;
 
index f76e795846e3150db6ea9043d578750a696b9a4b..29f16bb4028332d8550618f7da910f4f22bc18f7 100644 (file)
@@ -84,7 +84,6 @@ int _action_on_all_objects_in_pg(ObjectStore *store, coll_t coll, action_on_obje
                                   next,
                                   ghobject_t::get_max(),
                                   LIST_AT_A_TIME,
-                                  0,
                                   &list,
                                   &next);
     if (r < 0) {
@@ -412,7 +411,7 @@ void remove_coll(ObjectStore *store, const coll_t &coll)
   cout << "remove_coll " << coll << std::endl;
   while (!next.is_max()) {
     vector<ghobject_t> objects;
-    r = store->collection_list(coll, next, ghobject_t::get_max(), 300, 0,
+    r = store->collection_list(coll, next, ghobject_t::get_max(), 300,
       &objects, &next);
     if (r < 0)
       goto out;
@@ -700,7 +699,7 @@ int ObjectStoreTool::export_files(ObjectStore *store, coll_t coll)
 
   while (!next.is_max()) {
     vector<ghobject_t> objects;
-    int r = store->collection_list(coll, next, ghobject_t::get_max(), 300, 0,
+    int r = store->collection_list(coll, next, ghobject_t::get_max(), 300,
       &objects, &next);
     if (r < 0)
       return r;