]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crush/CrushWrapper: align variable name with comment
authorChangcheng Liu <changcheng.liu@aliyun.com>
Wed, 26 Aug 2020 06:18:34 +0000 (14:18 +0800)
committerChangcheng Liu <changcheng.liu@aliyun.com>
Sun, 6 Sep 2020 13:01:52 +0000 (21:01 +0800)
In the prolog of "for loop" statement, it writes "add child in the
location with 0 weight"

Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
src/crush/CrushWrapper.cc

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