[PATCH 0/2] virtio-scsi: stop using aio_disable_external() during unplug

Stefan Hajnoczi posted 2 patches 1 year, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230323185607.1458987-1-stefanha@redhat.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Fam Zheng <fam@euphon.net>, "Michael S. Tsirkin" <mst@redhat.com>
hw/scsi/scsi-bus.c    |  3 ++-
hw/scsi/scsi-disk.c   |  1 +
hw/scsi/virtio-scsi.c | 21 +++++++++------------
3 files changed, 12 insertions(+), 13 deletions(-)
[PATCH 0/2] virtio-scsi: stop using aio_disable_external() during unplug
Posted by Stefan Hajnoczi 1 year, 1 month ago
The aio_disable_external() API is a solution for stopping I/O during critical
sections. The newer BlockDevOps->drained_begin/end/poll() callbacks offer a
cleaner solution that supports the upcoming multi-queue block layer. This
series removes aio_disable_external() from the virtio-scsi emulation code.

Patch 1 is a fix for something I noticed when reading the code.

Patch 2 replaces aio_disable_external() with functionality for safe hot unplug
that's mostly already present in the SCSI emulation code.

Stefan Hajnoczi (2):
  virtio-scsi: avoid race between unplug and transport event
  virtio-scsi: stop using aio_disable_external() during unplug

 hw/scsi/scsi-bus.c    |  3 ++-
 hw/scsi/scsi-disk.c   |  1 +
 hw/scsi/virtio-scsi.c | 21 +++++++++------------
 3 files changed, 12 insertions(+), 13 deletions(-)

-- 
2.39.2
Re: [PATCH 0/2] virtio-scsi: stop using aio_disable_external() during unplug
Posted by Daniil Tatianin 1 year, 1 month ago
On 3/23/23 9:56 PM, Stefan Hajnoczi wrote:
> The aio_disable_external() API is a solution for stopping I/O during critical
> sections. The newer BlockDevOps->drained_begin/end/poll() callbacks offer a
> cleaner solution that supports the upcoming multi-queue block layer. This
> series removes aio_disable_external() from the virtio-scsi emulation code.
> 
> Patch 1 is a fix for something I noticed when reading the code.
> 
> Patch 2 replaces aio_disable_external() with functionality for safe hot unplug
> that's mostly already present in the SCSI emulation code.
> 
> Stefan Hajnoczi (2):
>    virtio-scsi: avoid race between unplug and transport event
>    virtio-scsi: stop using aio_disable_external() during unplug
> 
>   hw/scsi/scsi-bus.c    |  3 ++-
>   hw/scsi/scsi-disk.c   |  1 +
>   hw/scsi/virtio-scsi.c | 21 +++++++++------------
>   3 files changed, 12 insertions(+), 13 deletions(-)
> 

For both patches:
Reviewed-by: Daniil Tatianin <d-tatianin@yandex-team.ru>