]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
OSD::_make_pg: use createmap, not osdmap
authorSamuel Just <sam.just@inktank.com>
Mon, 22 Jul 2013 18:08:04 +0000 (11:08 -0700)
committerSamuel Just <sam.just@inktank.com>
Mon, 22 Jul 2013 18:11:08 +0000 (11:11 -0700)
The osd lock is not held at this point, we must use
the createmap passed in.

Fixes: #5656
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
src/osd/OSD.cc

index 8cc9e31459d61747cd5372d8755cd96ea9a5841d..464ed770df2d6eaf3a8565bdd1cc7b51cd4d0ef0 100644 (file)
@@ -1728,7 +1728,7 @@ PG* OSD::_make_pg(
   PG *pg;
   hobject_t logoid = make_pg_log_oid(pgid);
   hobject_t infooid = make_pg_biginfo_oid(pgid);
-  if (osdmap->get_pg_type(pgid) == pg_pool_t::TYPE_REP)
+  if (createmap->get_pg_type(pgid) == pg_pool_t::TYPE_REP)
     pg = new ReplicatedPG(&service, createmap, pool, pgid, logoid, infooid);
   else 
     assert(0);