thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone

Blame SOURCES/kvm-virtio-scsi-clean-up-virtio_scsi_handle_ctrl_vq.patch

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