]> git.baikalelectronics.ru Git - kernel.git/commit
virtio-blk: use virtqueue_add_sgs on bio path
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 20 Mar 2013 05:14:27 +0000 (15:44 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 20 Mar 2013 05:14:54 +0000 (15:44 +1030)
commitb813d558eaa215f9f54d46fa2677c91fc7f45c18
tree7ce3ac8d3b9d6fc47e9fc0a0edeb5c2e094242f0
parenta3e94dc040a2af9fc87d7c5105499cce0d8438d8
virtio-blk: use virtqueue_add_sgs on bio path

(This is a respin of Paolo Bonzini's patch, but it calls
virtqueue_add_sgs() instead of his multi-part API).

Move the creation of the request header and response footer to
__virtblk_add_req.  vbr->sg only contains the data scatterlist,
the header/footer are added separately using virtqueue_add_sgs().

With this change, virtio-blk (with use_bio) is not relying anymore on
the virtio functions ignoring the end markers in a scatterlist.
The next patch will do the same for the other path.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Asias He <asias@redhat.com>
drivers/block/virtio_blk.c