On 12/03/15 03:30, Roger Pau Monné wrote: > > @@ -343,20 +353,19 @@ void xen_blkbk_unmap_purged_grants(struct work_struct > *work) > > pages[segs_to_unmap] = persistent_gnt->page; > > - if (++segs_to_unmap == BLKIF_MAX_SEGMENTS_PER_REQUEST) { > - ret = gnttab_unmap_refs(unmap, NULL, pages, > - segs_to_unmap); > - BUG_ON(ret); > + if (++segs_to_unmap == BLKIF_MAX_SEGMENTS_PER_REQUEST || > + list_empty(&blkif->persistent_purge_list)) { > + > + unmap_data.count = segs_to_unmap; > + gnttab_unmap_refs_async(&unmap_data); > + wait_for_completion(&unmap_completion); > +
We now have a number of places that use the async unmap and wait for completion. Could this be moved into common code? David _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel