return -EINVAL;
}
+ // we have done sanity check above
crush_bucket *b = get_bucket(id);
- assert(b);
if (p->first != b->type) {
ldout(cct, 1) << "insert_item existing bucket has type "
if (!bucket_exists(bid))
continue;
crush_bucket *b = get_bucket(bid);
- if ( b == NULL)
- continue;
for (unsigned int i = 0; i < b->size; i++) {
if (b->items[i] == id) {
return crush_get_bucket_item_weight(b, i);
if (!bucket_exists(bid))
continue;
crush_bucket *b = get_bucket(bid);
- if ( b == NULL)
- continue;
for (unsigned int i = 0; i < b->size; i++) {
if (b->items[i] == id) {
int diff = crush_bucket_adjust_item_weight(crush, b, id, weight);