diff mbox

qemu-kvm: clear only essential parts of VirtIOBlockReq on object allocation - RESUBMIT

Message ID 41be791c0911091004x62d30fbey91ef730475ba3571@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Saul Tamari Nov. 9, 2009, 6:04 p.m. UTC
None
diff mbox

Patch

diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index 2630b99..de74b00 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -79,12 +79,13 @@  static inline void virtio_identify_template(struct
virtio_blk_config *bc)
 typedef struct VirtIOBlockReq
 {
     VirtIOBlock *dev;
-    VirtQueueElement elem;
     struct virtio_blk_inhdr *in;
     struct virtio_blk_outhdr *out;
     struct virtio_scsi_inhdr *scsi;
     QEMUIOVector qiov;
     struct VirtIOBlockReq *next;
+    /* Members that need clearing, must be added prior to elem */
+    VirtQueueElement elem;
 } VirtIOBlockReq;