]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd/OSDMonitor: count pg primed more precisely
authorxie xingguo <xie.xingguo@zte.com.cn>
Tue, 9 Aug 2016 07:39:28 +0000 (15:39 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Fri, 12 Aug 2016 04:37:04 +0000 (12:37 +0800)
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>
src/mon/OSDMonitor.cc

index 9ff8ef8f2b4e68587d5e8cd510469e7a43a2a42b..6ba65b0479a00d61297eed8bc4f8a65badb86336 100644 (file)
@@ -1107,7 +1107,7 @@ void OSDMonitor::maybe_prime_pg_temp()
     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 "