Displaying 1 result from an estimated 1 matches for "pers_gnts".
Did you mean:
pers_gnt
2012 Sep 19
27
[PATCH] Persistent grant maps for xen blk drivers
...static void make_response(struct xen_blkif *blkif, u64 id,
unsigned short op, int st);
+static void add_pers_gnt(struct pers_gnt *pers_gnt, struct xen_blkif *blkif)
+{
+ BUG_ON(blkif->pers_gnt_c >= BLKIF_MAX_PERS_REQUESTS_PER_DEV *
+ BLKIF_MAX_SEGMENTS_PER_REQUEST);
+ blkif->pers_gnts[blkif->pers_gnt_c++] = pers_gnt;
+}
+
+static struct pers_gnt *get_pers_gnt(struct xen_blkif *blkif,
+ grant_ref_t gref)
+{
+ int i;
+
+ for (i = 0; i < blkif->pers_gnt_c; i++)
+ if (gref == blkif->pers_gnts[i]->gnt)
+ return blkif->pers_gnts[i];
+ return NULL;
+}
+
/*...