this fixes the scrub timeouts we spotted in jenkins run and qa run.
it's a regression introduced by
c2b7cdb
Fixes: http://tracker.ceph.com/issues/17380
Signed-off-by: Loic Dachary <loic@dachary.org>
Signed-off-by: Kefu Chai <kchai@redhat.com>
p != m->scrub_pgs.end();
++p) {
spg_t pcand;
- auto pg_map_entry = pg_map.find(pcand);
- if (osdmap->get_primary_shard(*p, &pcand) &&
- pg_map_entry != pg_map.end())
- handle_pg_scrub(m, pg_map_entry->second);
+ if (osdmap->get_primary_shard(*p, &pcand)) {
+ auto pg_map_entry = pg_map.find(pcand);
+ if (pg_map_entry != pg_map.end()) {
+ handle_pg_scrub(m, pg_map_entry->second);
+ }
+ }
}
}