Lines Matching defs:item
56 * will produce an item in the bucket.
144 dprintk("list_choose i=%d x=%d r=%d item %d weight %x "
265 static int is_out(struct crush_map *map, __u32 *weight, int item, int x)
267 if (weight[item] >= 0x10000)
269 if (weight[item] == 0)
271 if ((crush_hash32_2(CRUSH_HASH_RJENKINS1, x, item) & 0xffff)
272 < weight[item])
280 * @bucket: the bucket we are choose an item from
283 * @type: the type of item to choose
287 * @recurse_to_leaf: true if we want one device under each item of given type
304 int item = 0;
313 /* keep trying until we get a non-out, non-colliding item */
354 item = bucket_perm_choose(in, x, r);
356 item = crush_bucket_choose(in, x, r);
357 BUG_ON(item >= map->max_devices);
360 if (item < 0)
361 itemtype = map->buckets[-1-item]->type;
364 dprintk(" item %d type %d\n", item, itemtype);
368 BUG_ON(item >= 0 ||
369 (-1-item) >= map->max_buckets);
370 in = map->buckets[-1-item];
377 if (out[i] == item) {
385 if (item < 0) {
387 map->buckets[-1-item],
397 out2[outpos] = item;
405 item, x);
440 dprintk("CHOOSE got %d\n", item);
441 out[outpos] = item;