When reviewing, I mistakenly thought we needed to skip a size check in
choose_acting() in case of mismatches between size and bucket counts, but that
is not accurate!
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
aheap.push_if_nonempty(anc.second);
});
- /* and pull from this heap until it's empty or we have enough. */
+ /* and pull from this heap until it's empty or we have enough.
+ * "We have enough" is a sufficient check here for
+ * stretch_set_can_peer() because our heap sorting always
+ * pulls from ancestors with the least number of included OSDs,
+ * so if it is possible to satisfy the bucket_count constraints we
+ * will do so.
+ */
while (!aheap.is_empty() && want->size() < pool.info.size) {
auto next = aheap.pop();
pop_ancestor(next.get());