]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crush/CrushWrapper: use "new_bucket_id" as var name of the added bucket
authorChangcheng Liu <changcheng.liu@aliyun.com>
Wed, 26 Aug 2020 06:22:10 +0000 (14:22 +0800)
committerChangcheng Liu <changcheng.liu@aliyun.com>
Sun, 6 Sep 2020 13:01:52 +0000 (21:01 +0800)
Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
src/crush/CrushWrapper.cc

index 355311dbd95968cfd884b5f0b6872e07bee9c22a..7ff81215fce712419ceab808d029cc3c102d7012 100644 (file)
@@ -1143,17 +1143,17 @@ int CrushWrapper::insert_item(
 
     if (!name_exists(q->second)) {
       ldout(cct, 5) << "insert_item creating bucket " << q->second << dendl;
-      int zero_weight = 0, newid;
+      int zero_weight = 0, new_bucket_id;
       int r = add_bucket(0, 0,
-                        CRUSH_HASH_DEFAULT, p->first, 1, &cur, &zero_weight, &newid);
+                        CRUSH_HASH_DEFAULT, p->first, 1, &cur, &zero_weight, &new_bucket_id);
       if (r < 0) {
         ldout(cct, 1) << "add_bucket failure error: " << cpp_strerror(r)
                      << dendl;
         return r;
       }
-      set_item_name(newid, q->second);
+      set_item_name(new_bucket_id, q->second);
       
-      cur = newid;
+      cur = new_bucket_id;
       continue;
     }