Roger Pau Monne c47206e25f xen-blkfront: improve aproximation of required grants per request
Improve the calculation of required grants to process a request by
using nr_phys_segments instead of always assuming a request is going
to use all posible segments.

nr_phys_segments contains the number of scatter-gather DMA addr+len
pairs, which is basically what we put at every granted page.
for_each_sg iterates over the DMA addr+len pairs and uses a grant
page for each of them.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: David Vrabel <david.vrabel@citrix.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2013-11-08 09:10:27 -07:00
..
2013-06-19 13:52:10 +02:00
2013-04-09 14:13:19 -04:00
2013-04-09 14:13:32 -04:00
2012-03-28 18:30:03 +01:00
2013-06-29 12:46:45 +04:00
2013-03-28 14:50:49 -04:00
2013-07-03 16:08:05 -07:00
2013-04-09 14:13:32 -04:00