linux/drivers/vhost
Mike Christie ced9eb376a vhost-scsi: Check for a cleared backend before queueing an event
We currenly hold the vhost_scsi_mutex while clearing the endpoint and
while performing vhost_scsi_do_plug, so tpg->vhost_scsi can't be freed
from uder us, and to make sure anything queued is handled by the
full call in vhost_scsi_clear_endpoint.

This patch removes the need for the vhost_scsi_mutex for the latter
case. In the next patches, we won't hold the vhost_scsi_mutex while
flushing so this patch adds a check for the clearing of the virtqueue
from vhost_scsi_clear_endpoint. We then know that once
vhost_scsi_clear_endpoint has cleared the backend that no new events
will be queued, and the flush after the vhost_vq_set_backend(vq, NULL)
call will see everything that's been queued to that point. So the flush
will then handle all events without the need for the vhost_scsi_mutex.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
Message-Id: <20230321020624.13323-6-michael.christie@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2023-04-21 03:02:30 -04:00
..
iotlb.c vhost_iotlb: split out IOTLB initialization 2022-05-31 12:44:28 -04:00
Kconfig vhost_vdpa: implement IRQ offloading in vhost_vdpa 2020-08-05 11:08:42 -04:00
Makefile vhost: introduce vDPA-based backend 2020-04-02 10:41:40 -04:00
net.c vhost-net: support VIRTIO_F_RING_RESET 2023-02-20 19:26:59 -05:00
scsi.c vhost-scsi: Check for a cleared backend before queueing an event 2023-04-21 03:02:30 -04:00
test.c vhost-test: remove meaningless debug info 2023-02-20 19:26:58 -05:00
test.h tools/virtio: Add --reset 2020-06-22 12:34:21 -04:00
vdpa.c vhost-vdpa: free iommu domain after last use during cleanup 2023-03-13 02:29:11 -04:00
vhost.c vhost: use struct_size and size_add to compute flex array sizes 2023-04-21 03:02:29 -04:00
vhost.h vhost: remove unused paramete 2023-02-20 19:26:58 -05:00
vringh.c vringh: use bvec_set_page to initialize a bvec 2023-02-03 10:17:42 -07:00
vsock.c virtio,vhost,vdpa: features, fixes 2023-02-25 11:48:02 -08:00