Re: [PATCH v2 1/3] scsi: virtio_scsi: kick event_list unconditionally

From: Matthew Rosato

Date: Mon Mar 16 2026 - 10:38:01 EST


On 3/12/26 1:42 PM, Joshua Daley wrote:
> The event_list processes non-hotplug events (such as LUN capacity
> changes), so remove the conditions that guard the initial kicks in
> _probe() and _restore(), as well as the work cancellation in _remove().
>
> Suggested-by: Stefan Hajnoczi <stefanha@xxxxxxxxxx>
> Signed-off-by: Joshua Daley <jdaley@xxxxxxxxxxxxx>

Reviewed-by: Matthew Rosato <mjrosato@xxxxxxxxxxxxx>

> ---
> drivers/scsi/virtio_scsi.c | 11 +++--------
> 1 file changed, 3 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
> index 0ed8558dad72..982f49bc6c69 100644
> --- a/drivers/scsi/virtio_scsi.c
> +++ b/drivers/scsi/virtio_scsi.c
> @@ -983,9 +983,7 @@ static int virtscsi_probe(struct virtio_device *vdev)
> goto scsi_add_host_failed;
>
> virtio_device_ready(vdev);
> -
> - if (virtio_has_feature(vdev, VIRTIO_SCSI_F_HOTPLUG))
> - virtscsi_kick_event_all(vscsi);
> + virtscsi_kick_event_all(vscsi);
>
> scsi_scan_host(shost);
> return 0;
> @@ -1002,8 +1000,7 @@ static void virtscsi_remove(struct virtio_device *vdev)
> struct Scsi_Host *shost = virtio_scsi_host(vdev);
> struct virtio_scsi *vscsi = shost_priv(shost);
>
> - if (virtio_has_feature(vdev, VIRTIO_SCSI_F_HOTPLUG))
> - virtscsi_cancel_event_work(vscsi);
> + virtscsi_cancel_event_work(vscsi);
>
> scsi_remove_host(shost);
> virtscsi_remove_vqs(vdev);
> @@ -1028,9 +1025,7 @@ static int virtscsi_restore(struct virtio_device *vdev)
> return err;
>
> virtio_device_ready(vdev);
> -
> - if (virtio_has_feature(vdev, VIRTIO_SCSI_F_HOTPLUG))
> - virtscsi_kick_event_all(vscsi);
> + virtscsi_kick_event_all(vscsi);
>
> return err;
> }