diff options
author | Fam Zheng | 2014-06-17 08:32:07 +0200 |
---|---|---|
committer | Kevin Wolf | 2014-06-27 18:20:35 +0200 |
commit | fee65db77181e6697745b313906bc4fdb30d2ff9 (patch) | |
tree | 91ae59b08f483a35860b41e45bcba8151acf7a48 /include | |
parent | virtio-blk: Make request completion function virtual (diff) | |
download | qemu-fee65db77181e6697745b313906bc4fdb30d2ff9.tar.gz qemu-fee65db77181e6697745b313906bc4fdb30d2ff9.tar.xz qemu-fee65db77181e6697745b313906bc4fdb30d2ff9.zip |
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 'include')
-rw-r--r-- | include/hw/virtio/virtio-blk.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio-blk.h b/include/hw/virtio/virtio-blk.h index 0398f4c46d..d0fb26f963 100644 --- a/include/hw/virtio/virtio-blk.h +++ b/include/hw/virtio/virtio-blk.h @@ -137,6 +137,11 @@ typedef struct VirtIOBlock { #endif } VirtIOBlock; +typedef struct MultiReqBuffer { + BlockRequest blkreq[32]; + unsigned int num_writes; +} MultiReqBuffer; + typedef struct VirtIOBlockReq { VirtIOBlock *dev; VirtQueueElement *elem; @@ -172,4 +177,8 @@ void virtio_blk_set_conf(DeviceState *dev, VirtIOBlkConf *blk); int virtio_blk_handle_scsi_req(VirtIOBlock *blk, VirtQueueElement *elem); +void virtio_blk_handle_request(VirtIOBlockReq *req, MultiReqBuffer *mrb); + +void virtio_submit_multiwrite(BlockDriverState *bs, MultiReqBuffer *mrb); + #endif |