Displaying 5 results from an estimated 5 matches for "vhost_scsi_mutex".
2023 Feb 23
1
[PATCH 3/5] vhost-scsi: Remove vhost_scsi_mutex from port link/unlink
We don't need the vhost_scsi_mutex in vhost_scsi_port_link and
vhost_scsi_port_unlink because LIO has a refcount on the se_tpg for us,
so it can't be removed while these functions are called. This removes the
vhost_scsi_mutex from those functions to avoid cases where we are adding
or removing LUNs to vhost-deviceA but are stuck...
2023 Feb 23
5
[PATCH 0/5] vhost-scsi: Fix management operation hangs
The following patches were made over Linus tree and also apply over
mst tree's vhost branch. The patches fix an issue where management
operations like LUN mapping/unmapping and device addition hang for 30
seconds or up to N minutes depending on the device.
The problem is that we use a global mutex to protect the list of tpgs
but we hold that mutex during those management operations. So if you
2023 Mar 21
8
[PATCH v2 0/7] vhost-scsi: Fix crashes and management op hangs
...se
refcounts and how often the global mutex is used so we don't need to
always hold it
v2:
1. Added fix for possible use after free and merge with a locking
cleanup patch.
2. Added fix for LIO LUN unmap during TMF execution bug.
3. Fixed bug where we needed to hold the tpg mutex instead of the
vhost_scsi_mutex when calling vhost_scsi_do_plug.
2019 Apr 16
1
[PATCH] vhost-scsi: remove incorrect memory barrier
At this point, vs_tpg is not public at all; tv_tpg_vhost_count
is accessed under tpg->tv_tpg_mutex; tpg->vhost_scsi is
accessed under vhost_scsi_mutex. Therefor there are no atomic
operations involved at all here, just remove the barrier.
Reported-by: Andrea Parri <andrea.parri at amarulasolutions.com>
Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
---
drivers/vhost/scsi.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/d...
2020 Sep 24
0
[PATCH 3/8] vhost scsi: alloc cmds per vq instead of session
...T_SCSI_MAX_TARGET; i++) {
> + tpg = vs_tpg[i];
> + if (tpg) {
> + tpg->tv_tpg_vhost_count--;
> + target_undepend_item(&tpg->se_tpg.tpg_group.cg_item);
> + }
> + }
> + kfree(vs_tpg);
> out:
> mutex_unlock(&vs->dev.mutex);
> mutex_unlock(&vhost_scsi_mutex);
> @@ -1549,6 +1653,12 @@ static void vhost_scsi_flush(struct vhost_scsi *vs)
> mutex_lock(&vq->mutex);
> vhost_vq_set_backend(vq, NULL);
> mutex_unlock(&vq->mutex);
> + /*
> + * Make sure cmds are not running before tearing them
> + * down.
&...