The crushtool --reweight function triggers a fresh calculation of bucket
weights so that they are always the sum of the item weights. In the
straw bucket case, the weights were updated but the corresponding straw
scalers were not being recalculated. The result is that there was not
effect on placement in adjusted buckets until the next time a bucket item's
weight was adjusted.
Backport: giant, firefly
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit
35062937f174a45fb13d9c177eaa1fe4ed5ff4c2)
bucket->h.weight += bucket->item_weights[i];
}
+ crush_calc_straw(bucket);
return 0;
}