~ubuntu-branches/ubuntu/quantal/ceph/quantal

« back to all changes in this revision

Viewing changes to src/osd/OSDMap.cc

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-07-16 09:56:24 UTC
  • mfrom: (0.3.11)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: package-import@ubuntu.com-20120716095624-azr2w4hbhei1rxmx
Tags: upstream-0.48
ImportĀ upstreamĀ versionĀ 0.48

Show diffs side-by-side

added added

removed removed

Lines of Context:
688
688
  for (map<int64_t,string>::iterator p = inc.new_pool_names.begin();
689
689
       p != inc.new_pool_names.end();
690
690
       p++) {
 
691
    if (pool_name.count(p->first))
 
692
      name_pool.erase(pool_name[p->first]);
691
693
    pool_name[p->first] = p->second;
692
694
    name_pool[p->second] = p->first;
693
695
  }
895
897
  return acting.size();
896
898
}
897
899
 
898
 
void OSDMap::pg_to_raw_up(pg_t pg, vector<int>& up)
 
900
void OSDMap::pg_to_raw_up(pg_t pg, vector<int>& up) const
899
901
{
900
902
  const pg_pool_t *pool = get_pg_pool(pg.pool());
901
903
  if (!pool)
1506
1508
  for (map<int,const char*>::iterator p = rulesets.begin(); p != rulesets.end(); p++) {
1507
1509
    int ruleset = p->first;
1508
1510
    crush_rule *rule = crush_make_rule(3, ruleset, pg_pool_t::TYPE_REP, minrep, maxrep);
 
1511
    assert(rule);
1509
1512
    crush_rule_set_step(rule, 0, CRUSH_RULE_TAKE, rootid, 0);
1510
1513
    // just spread across osds
1511
1514
    crush_rule_set_step(rule, 1, CRUSH_RULE_CHOOSE_FIRSTN, CRUSH_CHOOSE_N, 0);
1657
1660
  for (map<int,const char*>::iterator p = rulesets.begin(); p != rulesets.end(); p++) {
1658
1661
    int ruleset = p->first;
1659
1662
    crush_rule *rule = crush_make_rule(3, ruleset, pg_pool_t::TYPE_REP, minrep, maxrep);
 
1663
    assert(rule);
1660
1664
    crush_rule_set_step(rule, 0, CRUSH_RULE_TAKE, rootid, 0);
1661
1665
 
1662
1666
    if (racks.size() > 3) {