[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCHv5 12/14] xen-blkback: safely unmap grants in case they are still in use



On 03/13/2015 02:25 AM, David Vrabel wrote:
> 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?
> 

Sure, I'll make a patch after complete the testing.

Thanks,
-Bob


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.