Skip to content

Commit

Permalink
OSDMap: build_simple_from_conf pg_num should not be 0 with one osd
Browse files Browse the repository at this point in the history
Previously, pg_num would end up set to 0 if osd.0 is the only osd.

Signed-off-by: Samuel Just <[email protected]>
  • Loading branch information
Samuel Just authored and liewegas committed Dec 2, 2011
1 parent 363ebb6 commit 75aff02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/osd/OSDMap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1012,8 +1012,8 @@ void OSDMap::build_simple_from_conf(CephContext *cct, epoch_t e, uuid_d &fsid,
pools[pool].size = cct->_conf->osd_pool_default_size;
pools[pool].crush_ruleset = p->first;
pools[pool].object_hash = CEPH_STR_HASH_RJENKINS;
pools[pool].pg_num = maxosd << pg_bits;
pools[pool].pgp_num = maxosd << pgp_bits;
pools[pool].pg_num = (maxosd + 1) << pg_bits;
pools[pool].pgp_num = (maxosd + 1) << pgp_bits;
pools[pool].lpg_num = lpg_bits ? (1 << (lpg_bits-1)) : 0;
pools[pool].lpgp_num = lpg_bits ? (1 << (lpg_bits-1)) : 0;
pools[pool].last_change = epoch;
Expand Down

0 comments on commit 75aff02

Please sign in to comment.