summaryrefslogtreecommitdiff
path: root/hw/scsi/virtio-scsi-dataplane.c
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2014-09-23 15:49:27 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2014-09-30 11:11:20 +0200
commit359eea71d98e7f2cf9efb5e65bb59a240bedb131 (patch)
tree488092660d0b0365e33c873e0b9e8d22696533de /hw/scsi/virtio-scsi-dataplane.c
parentdfb37cf7fa206afa6e212af16fee74427464f1d1 (diff)
downloadqemu-359eea71d98e7f2cf9efb5e65bb59a240bedb131.zip
virtio-scsi: Two stages processing of cmd request
Mechanical change, in preparation for bdrv_io_plug/bdrv_io_unplug. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/scsi/virtio-scsi-dataplane.c')
-rw-r--r--hw/scsi/virtio-scsi-dataplane.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/scsi/virtio-scsi-dataplane.c b/hw/scsi/virtio-scsi-dataplane.c
index acbf622ed8..11f5705407 100644
--- a/hw/scsi/virtio-scsi-dataplane.c
+++ b/hw/scsi/virtio-scsi-dataplane.c
@@ -126,7 +126,9 @@ static void virtio_scsi_iothread_handle_cmd(EventNotifier *notifier)
event_notifier_test_and_clear(notifier);
while ((req = virtio_scsi_pop_req_vring(s, vring))) {
- virtio_scsi_handle_cmd_req(s, req);
+ if (virtio_scsi_handle_cmd_req_prepare(s, req)) {
+ virtio_scsi_handle_cmd_req_submit(s, req);
+ }
}
}