Lines Matching defs:grants
186 struct list_head grants;
218 /* Persistent grants feature negotiation result */
260 * Number of grants per physical segment
331 list_add(&gnt_list_entry->node, &rinfo->grants);
339 &rinfo->grants, node) {
354 BUG_ON(list_empty(&rinfo->grants));
355 gnt_list_entry = list_first_entry(&rinfo->grants, struct grant,
638 * All the grants are stored in the shadow of the first
652 * persistent grants are shared with just one
719 * existing persistent grants, or if we have to get new grants,
734 /* Check if we have enough persistent grants to allocate a requests */
998 "persistent grants:", info->feature_persistent ?
1215 * descriptors but not persistent grants
1227 /* Remove all persistent grants. */
1228 if (!list_empty(&rinfo->grants)) {
1230 &rinfo->grants, node) {
1246 * Clear persistent grants present in requests already
1414 * All the grants is stored in the first shadow in order
1457 /* Add the persistent grant into the list of free grants */
1471 list_add(&s->grants_used[i]->node, &rinfo->grants);
1477 * again unless we run out of persistent grants.
1480 list_add_tail(&s->grants_used[i]->node, &rinfo->grants);
1491 list_add(&s->indirect_grants[i]->node, &rinfo->grants);
1505 list_add_tail(&s->indirect_grants[i]->node, &rinfo->grants);
1762 /* Enable the persistent grants feature. */
1766 "Enables the persistent grants feature");
1864 "writing persistent grants feature to xenbus");
1921 INIT_LIST_HEAD(&rinfo->grants);
2163 unsigned int psegs, grants, memflags;
2171 grants = BLKIF_MAX_SEGMENTS_PER_REQUEST;
2175 * grants supported is related to the size of the
2178 grants = GRANTS_PER_PSEG;
2182 grants = info->max_indirect_segments;
2183 psegs = DIV_ROUND_UP(grants, GRANTS_PER_PSEG);
2186 (grants + INDIRECT_GREFS(grants)) * BLK_RING_SIZE(info));
2196 int num = INDIRECT_GREFS(grants) * BLK_RING_SIZE(info);
2210 kvcalloc(grants,
2218 kvcalloc(INDIRECT_GREFS(grants),
2531 LIST_HEAD(grants);
2540 list_for_each_entry_safe(gnt_list_entry, tmp, &rinfo->grants,
2549 list_add_tail(&gnt_list_entry->node, &grants);
2552 list_splice_tail(&grants, &rinfo->grants);
2564 * Note that when using bounce buffers but not persistent grants
2565 * there's no need to run blkfront_delay_work because grants are