summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFam Zheng2014-06-11 06:11:48 +0200
committerKevin Wolf2014-06-27 18:18:25 +0200
commit827805a2492c1bbf1c0712ed18ee069b4ebf3dd6 (patch)
tree879b2006b295fb99e4f545d3ddde0fb3eb1c2efc /include
parentvirtio-blk: Use VirtIOBlockReq.in to drop VirtIOBlockReq.inhdr (diff)
downloadqemu-827805a2492c1bbf1c0712ed18ee069b4ebf3dd6.tar.gz
qemu-827805a2492c1bbf1c0712ed18ee069b4ebf3dd6.tar.xz
qemu-827805a2492c1bbf1c0712ed18ee069b4ebf3dd6.zip
virtio-blk: Convert VirtIOBlockReq.out to structrue
The virtio code currently assumes that the outhdr is in its own iovec. This is not guaranteed by the spec, so we should relax this assumption. Convert the VirtIOBlockReq.out field to structrue so that we can use iov_to_buf and then discard the header from the beginning of iovec. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-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.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/hw/virtio/virtio-blk.h b/include/hw/virtio/virtio-blk.h
index b495e42d6d..2571e961ec 100644
--- a/include/hw/virtio/virtio-blk.h
+++ b/include/hw/virtio/virtio-blk.h
@@ -138,7 +138,7 @@ typedef struct VirtIOBlockReq {
VirtIOBlock *dev;
VirtQueueElement *elem;
struct virtio_blk_inhdr *in;
- struct virtio_blk_outhdr *out;
+ struct virtio_blk_outhdr out;
QEMUIOVector qiov;
struct VirtIOBlockReq *next;
BlockAcctCookie acct;