Lines Matching refs:item

62  * will produce an item in the bucket.
151 dprintk("list_choose i=%d x=%d r=%d item %d weight %x "
338 dprintk("weight 0x%x item %d\n", weights[i], ids[i]);
415 int item, int x)
417 if (item >= weight_max)
419 if (weight[item] >= 0x10000)
421 if (weight[item] == 0)
423 if ((crush_hash32_2(CRUSH_HASH_RJENKINS1, x, item) & 0xffff)
424 < weight[item])
432 * @bucket: the bucket we are choose an item from
435 * @type: the type of item to choose
443 * @recurse_to_leaf: true if we want one device under each item of given type (chooseleaf instead of choose)
473 int item = 0;
485 /* keep trying until we get a non-out, non-colliding item */
509 item = bucket_perm_choose(
513 item = crush_bucket_choose(
519 if (item >= map->max_devices) {
520 dprintk(" bad item %d\n", item);
526 if (item < 0)
527 itemtype = map->buckets[-1-item]->type;
530 dprintk(" item %d type %d\n", item, itemtype);
534 if (item >= 0 ||
535 (-1-item) >= map->max_buckets) {
536 dprintk(" bad item type %d\n", type);
540 in = map->buckets[-1-item];
547 if (out[i] == item) {
555 if (item < 0) {
564 map->buckets[-1-item],
581 out2[outpos] = item;
590 item, x);
624 dprintk("CHOOSE got %d\n", item);
625 out[outpos] = item;
662 int item = 0;
703 * choose a different item in that bucket.
724 item = crush_bucket_choose(
730 if (item >= map->max_devices) {
731 dprintk(" bad item %d\n", item);
740 if (item < 0)
741 itemtype = map->buckets[-1-item]->type;
744 dprintk(" item %d type %d\n", item, itemtype);
748 if (item >= 0 ||
749 (-1-item) >= map->max_buckets) {
750 dprintk(" bad item type %d\n", type);
758 in = map->buckets[-1-item];
765 if (out[i] == item) {
774 if (item < 0) {
778 map->buckets[-1-item],
791 out2[rep] = item;
797 is_out(map, weight, weight_max, item, x))
801 out[rep] = item;