From: Sage Weil Date: Fri, 14 Jul 2017 19:37:12 +0000 (-0400) Subject: crush/CrushWrapper: remove_item_under: weight down weight-sets X-Git-Tag: v12.1.2~150^2~11 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=4d52e41bafe5181e91085b150f55c860b41b2e83;p=ceph-ci.git crush/CrushWrapper: remove_item_under: weight down weight-sets Signed-off-by: Sage Weil --- diff --git a/src/crush/CrushWrapper.cc b/src/crush/CrushWrapper.cc index 66bffe0b012..2a7b7832b7d 100644 --- a/src/crush/CrushWrapper.cc +++ b/src/crush/CrushWrapper.cc @@ -518,6 +518,12 @@ int CrushWrapper::_remove_item_under( ldout(cct, 5) << "_remove_item_under removing item " << item << " from bucket " << b->id << dendl; bucket_remove_item(b, item); + for (auto& p : choose_args) { + // weight down each weight-set to 0 before we remove the item + vector weightv(get_choose_args_positions(p.second), 0); + _choose_args_adjust_item_weight_in_bucket( + cct, p.second, b->id, item, weightv, nullptr); + } adjust_item_weight(cct, b->id, b->weight); ret = 0; } else if (id < 0) {