]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Kill collection_list in CollectionIndex
authorXiaoxi Chen <xiaoxi.chen@intel.com>
Wed, 29 Apr 2015 08:27:16 +0000 (16:27 +0800)
committerSage Weil <sage@redhat.com>
Fri, 7 Aug 2015 12:45:34 +0000 (08:45 -0400)
Now we use CollectionIndex.collection_list_partial.

Signed-off-by: Xiaoxi Chen <xiaoxi.chen@intel.com>
src/os/CollectionIndex.h
src/os/HashIndex.cc
src/os/HashIndex.h
src/os/LFNIndex.cc
src/os/LFNIndex.h
src/test/objectstore/workload_generator.cc

index 2f832477b29f42a229feff0b2d2b27f188b0c653..093acc0aabdc43ee003cc0fbf9fc56095e83942f 100644 (file)
@@ -173,11 +173,6 @@ protected:
     ghobject_t *next         ///< [out] Next object to list
     ) = 0;
 
-  /// List contents of collection.
-  virtual int collection_list(
-    vector<ghobject_t> *ls ///< [out] Listed Objects
-    ) = 0;
-
   /// Call prior to removing directory
   virtual int prep_delete() { return 0; }
 
index d5494a90df7b3159d9e8790fd53cdc1068aab969..e791d6614ec9f5a640b179f0444c3b8bfbf8edd0 100644 (file)
@@ -320,11 +320,6 @@ int HashIndex::_lookup(const ghobject_t &oid,
   return get_mangled_name(*path, oid, mangled_name, exists_out);
 }
 
-int HashIndex::_collection_list(vector<ghobject_t> *ls) {
-  vector<string> path;
-  return list_by_hash(path, ghobject_t::get_max(), 0, 0, 0, ls);
-}
-
 int HashIndex::_collection_list_partial(const ghobject_t &start,
                                        const ghobject_t &end,
                                        int max_count,
index b94cb50524808b08ab3076a78da4813685d32eb5..0723a85114165275a918319d644c520bfc372462 100644 (file)
@@ -178,9 +178,6 @@ protected:
     string *mangled_name,
     int *exists
     );
-  int _collection_list(
-    vector<ghobject_t> *ls
-    );
 
   /**
    * Pre-hash the collection to create folders according to the expected number
index f0f5affc02531bebd836fa8719a4b73fe16c18f8..06dd161fedb2af92b398430dcba7a2c943e1fd9e 100644 (file)
@@ -143,11 +143,6 @@ int LFNIndex::lookup(const ghobject_t &oid,
   );
 }
 
-int LFNIndex::collection_list(vector<ghobject_t> *ls)
-{
-  return _collection_list(ls);
-}
-
 int LFNIndex::pre_hash_collection(uint32_t pg_num, uint64_t expected_num_objs)
 {
   return _pre_hash_collection(pg_num, expected_num_objs);
index 684d3ca08cc484527fe5b0b645e69128d613e085..a754477fafaeacce6c31e889cee3fec792e2e418 100644 (file)
@@ -178,11 +178,6 @@ public:
     int *exist
     );
 
-  /// @see CollectionIndex
-  int collection_list(
-    vector<ghobject_t> *ls
-    );
-
   /// @see CollectionIndex;
   int pre_hash_collection(
       uint32_t pg_num,
@@ -243,21 +238,6 @@ protected:
     int *exists                  ///< [out] True if the object exists.
     ) = 0;
 
-  /**
-   * List contents of the collection, must be implemented by derived class.
-   *
-   * @param [out] seq Snapid to list.
-   * @param [in] max_count Max number to list (0 for no limit).
-   * @param [out] ls Container for listed objects.
-   * @param [in,out] last List handle.  0 for beginning.  Passing the same
-   * cookie location will cause the next max_count to be listed.
-   * @return Error code.  0 on success.
-   */
-  /// List contents of collection.
-  virtual int _collection_list(
-    vector<ghobject_t> *ls ///< [out] Listed objects.
-    ) = 0;
-
   /// Pre-hash the collection with the given pg number and
   /// expected number of objects in the collection.
   virtual int _pre_hash_collection(
index 60d88e14082b0b45975679b77a2c796cf548fc3b..04bb906ce416d68805723fd93180cbdc213104b8 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, ls);
+  m_store->collection_list_impl(entry->m_coll, ghobject_t(), ghobject_t::get_max(), INT_MAX, 0, &ls, NULL);
   dout(2) << __func__ << " coll " << entry->m_coll
       << " (" << ls.size() << " objects)" << dendl;