mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
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>
This commit is contained in:
parent
b234cdda95
commit
edaffd9f0b
2 changed files with 14 additions and 10 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue