while (!_next.is_max() && ls->size() < (unsigned)min) {
vector<ghobject_t> objects;
- r = store->collection_list(
- ch,
- _next,
- ghobject_t::get_max(),
- max - ls->size(),
- &objects,
- &_next);
+ if (HAVE_FEATURE(parent->min_upacting_features(),
+ OSD_FIXED_COLLECTION_LIST)) {
+ r = store->collection_list(
+ ch,
+ _next,
+ ghobject_t::get_max(),
+ max - ls->size(),
+ &objects,
+ &_next);
+ } else {
+ r = store->collection_list_legacy(
+ ch,
+ _next,
+ ghobject_t::get_max(),
+ max - ls->size(),
+ &objects,
+ &_next);
+ }
if (r != 0) {
derr << __func__ << " list collection " << ch << " got: " << cpp_strerror(r) << dendl;
break;
{
ceph_assert(ls);
vector<ghobject_t> objects;
- int r = store->collection_list(
- ch,
- 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,
- &objects,
- NULL);
+ int r;
+ if (HAVE_FEATURE(parent->min_upacting_features(),
+ OSD_FIXED_COLLECTION_LIST)) {
+ r = store->collection_list(
+ ch,
+ 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,
+ &objects,
+ NULL);
+ } else {
+ r = store->collection_list_legacy(
+ ch,
+ 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,
+ &objects,
+ NULL);
+ }
ls->reserve(objects.size());
for (vector<ghobject_t>::iterator i = objects.begin();
i != objects.end();