]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PG: fix scrub feature check
authorSamuel Just <sam.just@inktank.com>
Thu, 20 Feb 2014 02:22:34 +0000 (18:22 -0800)
committerSamuel Just <sam.just@inktank.com>
Thu, 20 Feb 2014 02:22:36 +0000 (18:22 -0800)
acting[0] isn't necessarily the primary.  Start at
0 and explicitely skip the primary.

Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/PG.cc

index 5812b8bbb7bf75cd640a61dbc210370c499f457a..0941d2748343528ae42e1bac7d236d3f84ced658 100644 (file)
@@ -3592,7 +3592,9 @@ void PG::scrub(ThreadPool::TPHandle &handle)
     OSDMapRef curmap = osd->get_osdmap();
     scrubber.is_chunky = true;
     assert(backfill_targets.empty());
-    for (unsigned i=1; i<acting.size(); i++) {
+    for (unsigned i=0; i<acting.size(); i++) {
+      if (acting[i] == pg_whoami.shard)
+       continue;
       if (acting[i] == CRUSH_ITEM_NONE)
        continue;
       ConnectionRef con = osd->get_con_osd_cluster(acting[i], get_osdmap()->get_epoch());