aboutsummaryrefslogtreecommitdiff
path: root/include/hw/virtio/virtio-blk.h
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2016-06-21 13:13:13 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2016-06-28 13:08:32 +0100
commitedaffd9f0baa32c9524ac8bc80370a7257aa322e (patch)
treeed557dbe105c2383b52b92fe46ea8a1f015cd4ce /include/hw/virtio/virtio-blk.h
parentb234cdda958b329dbbec840702c65432f4907623 (diff)
virtio-blk: associate request with a virtqueue
Multiqueue requires that each request knows to which virtqueue it belongs. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Message-id: 1466511196-12612-5-git-send-email-stefanha@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include/hw/virtio/virtio-blk.h')
-rw-r--r--include/hw/virtio/virtio-blk.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/hw/virtio/virtio-blk.h b/include/hw/virtio/virtio-blk.h
index 9b03b6af2c..a25b3447d7 100644
--- a/include/hw/virtio/virtio-blk.h
+++ b/include/hw/virtio/virtio-blk.h
@@ -63,6 +63,7 @@ typedef struct VirtIOBlockReq {
VirtQueueElement elem;
int64_t sector_num;
VirtIOBlock *dev;
+ VirtQueue *vq;
struct virtio_blk_inhdr *in;
struct virtio_blk_outhdr out;
QEMUIOVector qiov;
@@ -80,7 +81,8 @@ typedef struct MultiReqBuffer {
bool is_write;
} MultiReqBuffer;
-void virtio_blk_init_request(VirtIOBlock *s, VirtIOBlockReq *req);
+void virtio_blk_init_request(VirtIOBlock *s, VirtQueue *vq,
+ VirtIOBlockReq *req);
void virtio_blk_free_request(VirtIOBlockReq *req);
void virtio_blk_handle_request(VirtIOBlockReq *req, MultiReqBuffer *mrb);