Now we use CollectionIndex.collection_list_partial.
Signed-off-by: Xiaoxi Chen <xiaoxi.chen@intel.com>
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; }
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,
string *mangled_name,
int *exists
);
- int _collection_list(
- vector<ghobject_t> *ls
- );
/**
* Pre-hash the collection to create folders according to the expected number
);
}
-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);
int *exist
);
- /// @see CollectionIndex
- int collection_list(
- vector<ghobject_t> *ls
- );
-
/// @see CollectionIndex;
int pre_hash_collection(
uint32_t pg_num,
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(
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;