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 <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Fam Zheng 2014-09-23 15:49:28 +08:00 committed by Paolo Bonzini
parent 359eea71d9
commit 1880ad4f4e
3 changed files with 18 additions and 4 deletions

View file

@ -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;