summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2014-06-11 12:11:48 +0800
committerKevin Wolf <kwolf@redhat.com>2014-06-27 18:18:25 +0200
commit827805a2492c1bbf1c0712ed18ee069b4ebf3dd6 (patch)
tree879b2006b295fb99e4f545d3ddde0fb3eb1c2efc /include
parenteddb102e86f61d4b71877f8ac268ebc4bf7265bf (diff)
downloadqemu-827805a2492c1bbf1c0712ed18ee069b4ebf3dd6.tar.gz
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;