diff options
author | Fam Zheng <famz@redhat.com> | 2014-06-17 14:32:07 +0800 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-06-27 18:20:35 +0200 |
commit | fee65db77181e6697745b313906bc4fdb30d2ff9 (patch) | |
tree | 91ae59b08f483a35860b41e45bcba8151acf7a48 /hw/block/virtio-blk.c | |
parent | bf4bd461b43d90c5af30f61f740c1bb675849ab9 (diff) | |
download | qemu-fee65db77181e6697745b313906bc4fdb30d2ff9.zip qemu-fee65db77181e6697745b313906bc4fdb30d2ff9.tar.gz qemu-fee65db77181e6697745b313906bc4fdb30d2ff9.tar.bz2 |
virtio-blk: Export request handling functions to dataplane
So that dataplane can use virtio_blk_handle_request and
virtio_submit_multiwrite.
Signed-off-by: Fam Zheng <famz@redhat.com>
Tested-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/block/virtio-blk.c')
-rw-r--r-- | hw/block/virtio-blk.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 9975ad0..77fb447 100644 --- a/hw/block/virtio-blk.c +++ b/hw/block/virtio-blk.c @@ -253,12 +253,7 @@ static void virtio_blk_handle_scsi(VirtIOBlockReq *req) virtio_blk_free_request(req); } -typedef struct MultiReqBuffer { - BlockRequest blkreq[32]; - unsigned int num_writes; -} MultiReqBuffer; - -static void virtio_submit_multiwrite(BlockDriverState *bs, MultiReqBuffer *mrb) +void virtio_submit_multiwrite(BlockDriverState *bs, MultiReqBuffer *mrb) { int i, ret; @@ -347,8 +342,7 @@ static void virtio_blk_handle_read(VirtIOBlockReq *req) virtio_blk_rw_complete, req); } -static void virtio_blk_handle_request(VirtIOBlockReq *req, - MultiReqBuffer *mrb) +void virtio_blk_handle_request(VirtIOBlockReq *req, MultiReqBuffer *mrb) { uint32_t type; struct iovec *in_iov = req->elem->in_sg; |