The prime_pg_temp() method will return the number of PG primed within
the given OSD. So below here we don't have to decrease n by 1, which
is the default behaviour when all is set and we have to prime all the
PGs one by one.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
dout(10) << __func__ << " " << osds.size() << " interesting osds" << dendl;
for (set<int>::iterator p = osds.begin(); p != osds.end(); ++p) {
n -= prime_pg_temp(next, pg_map, *p);
- if (--n <= 0) {
+ if (n <= 0) {
n = chunk;
if (ceph_clock_now(NULL) > stop) {
dout(10) << __func__ << " consumed more than "