virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] virtio_scsi: remove duplicate check if queue is broken
@ 2024-01-16  4:58 Li RongQing
  2024-01-16 13:02 ` Stefan Hajnoczi
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Li RongQing @ 2024-01-16  4:58 UTC (permalink / raw)
  To: mst, jasowang, pbonzini, stefanha, jejb, martin.petersen,
	virtualization, linux-scsi
  Cc: Li RongQing

virtqueue_enable_cb() will call virtqueue_poll() which will check if
queue is broken at beginning, so remove the virtqueue_is_broken() call

Signed-off-by: Li RongQing <lirongqing@baidu.com>
---
 drivers/scsi/virtio_scsi.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
index 9d1bdcd..e15b380 100644
--- a/drivers/scsi/virtio_scsi.c
+++ b/drivers/scsi/virtio_scsi.c
@@ -182,8 +182,6 @@ static void virtscsi_vq_done(struct virtio_scsi *vscsi,
 		while ((buf = virtqueue_get_buf(vq, &len)) != NULL)
 			fn(vscsi, buf);
 
-		if (unlikely(virtqueue_is_broken(vq)))
-			break;
 	} while (!virtqueue_enable_cb(vq));
 	spin_unlock_irqrestore(&virtscsi_vq->vq_lock, flags);
 }
-- 
2.9.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] virtio_scsi: remove duplicate check if queue is broken
  2024-01-16  4:58 [PATCH] virtio_scsi: remove duplicate check if queue is broken Li RongQing
@ 2024-01-16 13:02 ` Stefan Hajnoczi
  2024-01-16 13:04 ` Michael S. Tsirkin
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2024-01-16 13:02 UTC (permalink / raw)
  To: Li RongQing
  Cc: mst, jasowang, pbonzini, stefanha, jejb, martin.petersen,
	virtualization, linux-scsi

On Tue, 16 Jan 2024 at 00:07, Li RongQing <lirongqing@baidu.com> wrote:
>
> virtqueue_enable_cb() will call virtqueue_poll() which will check if
> queue is broken at beginning, so remove the virtqueue_is_broken() call
>
> Signed-off-by: Li RongQing <lirongqing@baidu.com>
> ---
>  drivers/scsi/virtio_scsi.c | 2 --
>  1 file changed, 2 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

> diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
> index 9d1bdcd..e15b380 100644
> --- a/drivers/scsi/virtio_scsi.c
> +++ b/drivers/scsi/virtio_scsi.c
> @@ -182,8 +182,6 @@ static void virtscsi_vq_done(struct virtio_scsi *vscsi,
>                 while ((buf = virtqueue_get_buf(vq, &len)) != NULL)
>                         fn(vscsi, buf);
>
> -               if (unlikely(virtqueue_is_broken(vq)))
> -                       break;
>         } while (!virtqueue_enable_cb(vq));
>         spin_unlock_irqrestore(&virtscsi_vq->vq_lock, flags);
>  }
> --
> 2.9.4
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] virtio_scsi: remove duplicate check if queue is broken
  2024-01-16  4:58 [PATCH] virtio_scsi: remove duplicate check if queue is broken Li RongQing
  2024-01-16 13:02 ` Stefan Hajnoczi
@ 2024-01-16 13:04 ` Michael S. Tsirkin
  2024-01-17 19:46 ` Martin K. Petersen
  2024-01-24  3:00 ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Michael S. Tsirkin @ 2024-01-16 13:04 UTC (permalink / raw)
  To: Li RongQing
  Cc: jasowang, pbonzini, stefanha, jejb, martin.petersen,
	virtualization, linux-scsi

On Tue, Jan 16, 2024 at 12:58:36PM +0800, Li RongQing wrote:
> virtqueue_enable_cb() will call virtqueue_poll() which will check if
> queue is broken at beginning, so remove the virtqueue_is_broken() call
> 
> Signed-off-by: Li RongQing <lirongqing@baidu.com>

Acked-by: Michael S. Tsirkin <mst@redhat.com>


> ---
>  drivers/scsi/virtio_scsi.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
> index 9d1bdcd..e15b380 100644
> --- a/drivers/scsi/virtio_scsi.c
> +++ b/drivers/scsi/virtio_scsi.c
> @@ -182,8 +182,6 @@ static void virtscsi_vq_done(struct virtio_scsi *vscsi,
>  		while ((buf = virtqueue_get_buf(vq, &len)) != NULL)
>  			fn(vscsi, buf);
>  
> -		if (unlikely(virtqueue_is_broken(vq)))
> -			break;
>  	} while (!virtqueue_enable_cb(vq));
>  	spin_unlock_irqrestore(&virtscsi_vq->vq_lock, flags);
>  }
> -- 
> 2.9.4


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] virtio_scsi: remove duplicate check if queue is broken
  2024-01-16  4:58 [PATCH] virtio_scsi: remove duplicate check if queue is broken Li RongQing
  2024-01-16 13:02 ` Stefan Hajnoczi
  2024-01-16 13:04 ` Michael S. Tsirkin
@ 2024-01-17 19:46 ` Martin K. Petersen
  2024-01-24  3:00 ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2024-01-17 19:46 UTC (permalink / raw)
  To: Li RongQing
  Cc: mst, jasowang, pbonzini, stefanha, jejb, martin.petersen,
	virtualization, linux-scsi


> virtqueue_enable_cb() will call virtqueue_poll() which will check if
> queue is broken at beginning, so remove the virtqueue_is_broken() call

Applied to 6.8/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] virtio_scsi: remove duplicate check if queue is broken
  2024-01-16  4:58 [PATCH] virtio_scsi: remove duplicate check if queue is broken Li RongQing
                   ` (2 preceding siblings ...)
  2024-01-17 19:46 ` Martin K. Petersen
@ 2024-01-24  3:00 ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2024-01-24  3:00 UTC (permalink / raw)
  To: mst, jasowang, pbonzini, stefanha, jejb, virtualization,
	linux-scsi, Li RongQing
  Cc: Martin K . Petersen

On Tue, 16 Jan 2024 12:58:36 +0800, Li RongQing wrote:

> virtqueue_enable_cb() will call virtqueue_poll() which will check if
> queue is broken at beginning, so remove the virtqueue_is_broken() call
> 
> 

Applied to 6.8/scsi-fixes, thanks!

[1/1] virtio_scsi: remove duplicate check if queue is broken
      https://git.kernel.org/mkp/scsi/c/d6b75ba52189

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-01-24  3:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-16  4:58 [PATCH] virtio_scsi: remove duplicate check if queue is broken Li RongQing
2024-01-16 13:02 ` Stefan Hajnoczi
2024-01-16 13:04 ` Michael S. Tsirkin
2024-01-17 19:46 ` Martin K. Petersen
2024-01-24  3:00 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).