|
|
586cba |
From c6e16a7a5a18ec2bc4f8a6f5cc1c887e18b16cdf Mon Sep 17 00:00:00 2001
|
|
|
586cba |
From: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
586cba |
Date: Tue, 17 May 2022 09:28:12 +0100
|
|
|
586cba |
Subject: [PATCH 12/16] virtio-scsi: clean up virtio_scsi_handle_ctrl_vq()
|
|
|
586cba |
|
|
|
586cba |
RH-Author: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
586cba |
RH-MergeRequest: 88: virtio-scsi: fix 100% CPU consumption with IOThreads
|
|
|
586cba |
RH-Commit: [4/6] ca3751b7bfad5163c5b1c81b8525936a848d42ea (stefanha/centos-stream-qemu-kvm)
|
|
|
586cba |
RH-Bugzilla: 2079347
|
|
|
586cba |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
586cba |
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
586cba |
RH-Acked-by: Stefano Garzarella <sgarzare@redhat.com>
|
|
|
586cba |
|
|
|
586cba |
virtio_scsi_handle_ctrl_vq() is only called from hw/scsi/virtio-scsi.c
|
|
|
586cba |
now and its return value is no longer used. Remove the function
|
|
|
586cba |
prototype from virtio-scsi.h and drop the return value.
|
|
|
586cba |
|
|
|
586cba |
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
586cba |
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
586cba |
Message-id: 20220427143541.119567-5-stefanha@redhat.com
|
|
|
586cba |
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
586cba |
(cherry picked from commit 73b3b49f1880f236b4d0ffd7efb00280c05a5fab)
|
|
|
586cba |
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
586cba |
---
|
|
|
586cba |
hw/scsi/virtio-scsi.c | 5 +----
|
|
|
586cba |
include/hw/virtio/virtio-scsi.h | 1 -
|
|
|
586cba |
2 files changed, 1 insertion(+), 5 deletions(-)
|
|
|
586cba |
|
|
|
586cba |
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
|
|
|
586cba |
index dd2185b943..a47033d91d 100644
|
|
|
586cba |
--- a/hw/scsi/virtio-scsi.c
|
|
|
586cba |
+++ b/hw/scsi/virtio-scsi.c
|
|
|
586cba |
@@ -460,16 +460,13 @@ static void virtio_scsi_handle_ctrl_req(VirtIOSCSI *s, VirtIOSCSIReq *req)
|
|
|
586cba |
}
|
|
|
586cba |
}
|
|
|
586cba |
|
|
|
586cba |
-bool virtio_scsi_handle_ctrl_vq(VirtIOSCSI *s, VirtQueue *vq)
|
|
|
586cba |
+static void virtio_scsi_handle_ctrl_vq(VirtIOSCSI *s, VirtQueue *vq)
|
|
|
586cba |
{
|
|
|
586cba |
VirtIOSCSIReq *req;
|
|
|
586cba |
- bool progress = false;
|
|
|
586cba |
|
|
|
586cba |
while ((req = virtio_scsi_pop_req(s, vq))) {
|
|
|
586cba |
- progress = true;
|
|
|
586cba |
virtio_scsi_handle_ctrl_req(s, req);
|
|
|
586cba |
}
|
|
|
586cba |
- return progress;
|
|
|
586cba |
}
|
|
|
586cba |
|
|
|
586cba |
/*
|
|
|
586cba |
diff --git a/include/hw/virtio/virtio-scsi.h b/include/hw/virtio/virtio-scsi.h
|
|
|
586cba |
index 5957597825..44dc3b81ec 100644
|
|
|
586cba |
--- a/include/hw/virtio/virtio-scsi.h
|
|
|
586cba |
+++ b/include/hw/virtio/virtio-scsi.h
|
|
|
586cba |
@@ -152,7 +152,6 @@ void virtio_scsi_common_realize(DeviceState *dev,
|
|
|
586cba |
|
|
|
586cba |
void virtio_scsi_common_unrealize(DeviceState *dev);
|
|
|
586cba |
bool virtio_scsi_handle_cmd_vq(VirtIOSCSI *s, VirtQueue *vq);
|
|
|
586cba |
-bool virtio_scsi_handle_ctrl_vq(VirtIOSCSI *s, VirtQueue *vq);
|
|
|
586cba |
void virtio_scsi_init_req(VirtIOSCSI *s, VirtQueue *vq, VirtIOSCSIReq *req);
|
|
|
586cba |
void virtio_scsi_free_req(VirtIOSCSIReq *req);
|
|
|
586cba |
void virtio_scsi_push_event(VirtIOSCSI *s, SCSIDevice *dev,
|
|
|
586cba |
--
|
|
|
586cba |
2.31.1
|
|
|
586cba |
|