From: Roger Pau Monne Date: Mon, 12 Aug 2013 10:53:43 +0000 (+0200) Subject: xen-blkfront: improve aproximation of required grants per request X-Git-Tag: v3.13-rc1~100^2~38 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c47206e25f28232ff979994c32758c82841d81cd;p=pandora-kernel.git 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é Reviewed-by: David Vrabel Cc: Konrad Rzeszutek Wilk Cc: David Vrabel Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Jens Axboe --- Reading git-diff-tree failed