Skip to content

Commit

Permalink
crush/CrushWrapper: align variable name with comment
Browse files Browse the repository at this point in the history
In the prolog of "for loop" statement, it writes "add child in the
location with 0 weight"

Signed-off-by: Changcheng Liu <[email protected]>
  • Loading branch information
changchengx committed Sep 6, 2020
1 parent dce22e3 commit 0d87e96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/crush/CrushWrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0d87e96

Please sign in to comment.