Displaying 3 results from an estimated 3 matches for "segs_to_unmap".
2012 Dec 03
1
xen-blkback: move free persistent grants code
...70f1880: "xen-blkback: move free persistent grants
code" from Nov 16, 2012, leads to the following warning:
drivers/block/xen-blkback/blkback.c:238 free_persistent_gnts()
warn: 'persistent_gnt' was already freed.
drivers/block/xen-blkback/blkback.c
232 pages[segs_to_unmap] = persistent_gnt->page;
233 rb_erase(&persistent_gnt->node, root);
234 kfree(persistent_gnt);
^^^^^^^^^^^^^^^^^^^^
kfree();
235 num--;
236
237 if (++segs_to_unmap == BLKIF_MAX_SE...
2012 Dec 03
1
xen-blkback: move free persistent grants code
...70f1880: "xen-blkback: move free persistent grants
code" from Nov 16, 2012, leads to the following warning:
drivers/block/xen-blkback/blkback.c:238 free_persistent_gnts()
warn: 'persistent_gnt' was already freed.
drivers/block/xen-blkback/blkback.c
232 pages[segs_to_unmap] = persistent_gnt->page;
233 rb_erase(&persistent_gnt->node, root);
234 kfree(persistent_gnt);
^^^^^^^^^^^^^^^^^^^^
kfree();
235 num--;
236
237 if (++segs_to_unmap == BLKIF_MAX_SE...
2012 Sep 19
27
[PATCH] Persistent grant maps for xen blk drivers
...@ int xen_blkif_schedule(void *arg)
{
struct xen_blkif *blkif = arg;
struct xen_vbd *vbd = &blkif->vbd;
+ struct gnttab_unmap_grant_ref unmap[BLKIF_MAX_SEGMENTS_PER_REQUEST];
+ struct page *pages[BLKIF_MAX_SEGMENTS_PER_REQUEST];
+ struct pers_gnt *pers_gnt;
+ int i;
+ int ret = 0;
+ int segs_to_unmap;
xen_blkif_get(blkif);
@@ -301,6 +326,29 @@ int xen_blkif_schedule(void *arg)
print_stats(blkif);
}
+ /* Free all persistent grant pages */
+
+ while (segs_to_unmap = min(BLKIF_MAX_SEGMENTS_PER_REQUEST,
+ blkif->pers_gnt_c)) {
+
+ for (i = 0; i < segs_to_unmap; i++) {
+ p...