Skip to content

vhost-scsi: Fix management operation hangs

Mike Christie linux-scsi target-devel virtualization 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5vhost-scsi: Hold tv_tpg_mutex when decrementing tv_tpg_vhost_countdrivers/vhost/scsi.c+2 -00 replies
2/5vhost-scsi: Drop vhost_scsi_flush during endpoint clearingdrivers/vhost/scsi.c+1 -50 replies
3/5vhost-scsi: Remove vhost_scsi_mutex from port link/unlinkdrivers/vhost/scsi.c+1 -101 reply
4/5vhost-scsi: Delay releasing our refcount on the tpgdrivers/vhost/scsi.c+37 -250 replies
5/5vhost-scsi: Reduce vhost_scsi_mutex usedrivers/vhost/scsi.c+5 -60 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [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 are just trying to add another device, it will have to wait on another device if we are in the middle of clearing it's endpoint and it's waiting on hung IO.

This patchset fixes up the ordering of how we flush IO and release refcounts so we don't need to always hold the mutex.