From 1880ad4f4e3b49f15c55e816d66b9690b3ede00c Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Tue, 23 Sep 2014 15:49:28 +0800 Subject: virtio-scsi: Batched prepare for cmd reqs Queue the popped requests while calling virtio_scsi_handle_cmd_req_prepare(), then submit them after all prepared. Signed-off-by: Fam Zheng Signed-off-by: Paolo Bonzini --- include/hw/virtio/virtio-scsi.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/hw/virtio/virtio-scsi.h') diff --git a/include/hw/virtio/virtio-scsi.h b/include/hw/virtio/virtio-scsi.h index 1cc759a644..60dbfc99a8 100644 --- a/include/hw/virtio/virtio-scsi.h +++ b/include/hw/virtio/virtio-scsi.h @@ -213,6 +213,10 @@ typedef struct VirtIOSCSIReq { VirtQueueElement elem; /* Set by dataplane code. */ VirtIOSCSIVring *vring; + + /* Used for two-stage request submission */ + QTAILQ_ENTRY(VirtIOSCSIReq) next; + SCSIRequest *sreq; size_t resp_size; enum SCSIXferMode mode; -- cgit v1.2.3