Skip to content

Commit

Permalink
Merge pull request #5404 from SUSE/wip-12395-firefly
Browse files Browse the repository at this point in the history
register_new_pgs() should check ruleno instead of its index

Reviewed-by: Kefu Chai <kchai@redhat.com>
  • Loading branch information
smithfarm committed Sep 9, 2015
2 parents 79403ba + 5445461 commit 973b74d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mon/PGMonitor.cc
Expand Up @@ -1000,8 +1000,8 @@ bool PGMonitor::register_new_pgs()
++p) {
int64_t poolid = p->first;
pg_pool_t &pool = p->second;
int ruleno = pool.get_crush_ruleset();
if (!osdmap->crush->rule_exists(ruleno))
int ruleno = osdmap->crush->find_rule(pool.get_crush_ruleset(), pool.get_type(), pool.get_size());
if (ruleno < 0 || !osdmap->crush->rule_exists(ruleno))
continue;

if (pool.get_last_change() <= pg_map.last_pg_scan ||
Expand Down

0 comments on commit 973b74d

Please sign in to comment.