]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osdmap: set 'default' pool type correctly
authorSage Weil <sage.weil@dreamhost.com>
Wed, 4 Apr 2012 00:01:51 +0000 (17:01 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Wed, 4 Apr 2012 00:01:51 +0000 (17:01 -0700)
Got this wrong in e85961167eb1f37f80f263257799e4e901d17e74

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/osd/OSDMap.cc

index d7f184fba6383193d6b9d42f800febf8c7e9a073..42c0608f9301fe0861d0f7b8040054b264ff8f96 100644 (file)
@@ -1129,7 +1129,7 @@ void OSDMap::build_simple_crush_map(CephContext *cct, CrushWrapper& crush,
   crush.set_type_name(6, "pool");
 
   // root
-  int rootid = crush.add_bucket(0, CRUSH_BUCKET_STRAW, CRUSH_HASH_DEFAULT, 3 /* pool */, 0, NULL, NULL);
+  int rootid = crush.add_bucket(0, CRUSH_BUCKET_STRAW, CRUSH_HASH_DEFAULT, 6 /* pool */, 0, NULL, NULL);
   crush.set_item_name(rootid, "default");
 
   for (int o=0; o<nosd; o++) {
@@ -1238,12 +1238,15 @@ void OSDMap::build_simple_crush_map_from_conf(CephContext *cct, CrushWrapper& cr
   crush.set_type_name(0, "osd");
   crush.set_type_name(1, "host");
   crush.set_type_name(2, "rack");
-  crush.set_type_name(3, "pool");
+  crush.set_type_name(3, "row");
+  crush.set_type_name(4, "room");
+  crush.set_type_name(5, "datacenter");
+  crush.set_type_name(6, "pool");
 
   set<string> hosts, racks;
 
   // root
-  int rootid = crush.add_bucket(0, CRUSH_BUCKET_STRAW, CRUSH_HASH_DEFAULT, 3 /* pool */, 0, NULL, NULL);
+  int rootid = crush.add_bucket(0, CRUSH_BUCKET_STRAW, CRUSH_HASH_DEFAULT, 6 /* pool */, 0, NULL, NULL);
   crush.set_item_name(rootid, "default");
 
   // add osds