mirror of
https://github.com/ceph/ceph
synced 2024-12-17 00:46:05 +00:00
crush: fix bucket_remove_item() won't update weight-set simultaneously
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
This commit is contained in:
parent
475bddab51
commit
0e1d37f6f3
@ -1780,8 +1780,8 @@ int CrushWrapper::bucket_remove_item(crush_bucket *bucket, int item)
|
||||
if (r < 0) {
|
||||
return r;
|
||||
}
|
||||
for (auto w : choose_args) {
|
||||
crush_choose_arg_map arg_map = w.second;
|
||||
for (auto &w : choose_args) {
|
||||
crush_choose_arg_map &arg_map = w.second;
|
||||
crush_choose_arg *arg = &arg_map.args[-1-bucket->id];
|
||||
for (__u32 j = 0; j < arg->weight_set_size; j++) {
|
||||
crush_weight_set *weight_set = &arg->weight_set[j];
|
||||
|
Loading…
Reference in New Issue
Block a user