OPTION(osd_journal, OPT_STR, "/var/lib/ceph/osd/$cluster-$id/journal")
OPTION(osd_journal_size, OPT_INT, 0) // in mb
OPTION(osd_max_write_size, OPT_INT, 90)
+OPTION(osd_max_pgls, OPT_U64, 1024) // max number of pgls entries to return
OPTION(osd_balance_reads, OPT_BOOL, false)
OPTION(osd_shed_reads, OPT_INT, false) // forward from primary to replica
OPTION(osd_shed_reads_min_latency, OPT_DOUBLE, .01) // min local latency
dout(10) << " pgls pg=" << m->get_pg() << " != " << info.pgid << dendl;
result = 0; // hmm?
} else {
- dout(10) << " pgls pg=" << m->get_pg() << " count " << p->op.pgls.count << dendl;
+ unsigned list_size = MIN(g_conf->osd_max_pgls, p->op.pgls.count);
+
+ dout(10) << " pgls pg=" << m->get_pg() << " count " << list_size << dendl;
// read into a buffer
vector<hobject_t> sentries;
pg_ls_response_t response;
hobject_t current = response.handle;
osr.flush();
int r = osd->store->collection_list_partial(coll, current,
- p->op.pgls.count,
- p->op.pgls.count,
+ list_size,
+ list_size,
snapid,
&sentries,
&next);
candidate = (missing_iter++)->first;
}
- if (response.entries.size() == p->op.pgls.count) {
+ if (response.entries.size() == list_size) {
next = candidate;
+ break;
}
// skip snapdir objects
response.entries.push_back(make_pair(candidate.oid,
candidate.get_key()));
}
+ if (next.is_max() &&
+ missing_iter == missing.missing.end() &&
+ ls_iter == sentries.end()) {
+ result = 1;
+ }
response.handle = next;
::encode(response, outdata);
if (filter)