From: Changcheng Liu Date: Wed, 26 Aug 2020 06:22:10 +0000 (+0800) Subject: crush/CrushWrapper: use "new_bucket_id" as var name of the added bucket X-Git-Tag: v16.1.0~1173^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=92d43dabbd22e9d0347caf247d7f8262ce882dc5;p=ceph.git crush/CrushWrapper: use "new_bucket_id" as var name of the added bucket Signed-off-by: Changcheng Liu --- diff --git a/src/crush/CrushWrapper.cc b/src/crush/CrushWrapper.cc index 355311dbd959..7ff81215fce7 100644 --- a/src/crush/CrushWrapper.cc +++ b/src/crush/CrushWrapper.cc @@ -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; }