]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
scsi: storvsc: Allow only one remove lun work item to be issued per lun
authorCathy Avery <cavery@redhat.com>
Tue, 31 Oct 2017 12:52:06 +0000 (08:52 -0400)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 3 Nov 2017 15:29:22 +0000 (11:29 -0400)
commit436ad941335386c5fc7faa915a8fbdfe8c908084
tree3eb9e76bf92f384b8b7229ace9cdd00601b3a90e
parentca6958b4da8b7fd9f6ac3bf94def9cfb8a1d6c25
scsi: storvsc: Allow only one remove lun work item to be issued per lun

When running multipath on a VM if all available paths go down the driver
can schedule large amounts of storvsc_remove_lun work items to the same
lun. In response to the failing paths typically storvsc responds by
taking host->scan_mutex and issuing a TUR per lun. If there has been
heavy IO to the failed device all the failed IOs are returned from the
host. A remove lun work item is issued per failed IO. If the outstanding
TURs have not been completed in a timely manner the scan_mutex is never
released or released too late. Consequently the many remove lun work
items are not completed as scsi_remove_device also tries to take
host->scan_mutex.  This results in dragging the VM down and sometimes
completely.

This patch only allows one remove lun to be issued to a particular lun
while it is an instantiated member of the scsi stack.

Signed-off-by: Cathy Avery <cavery@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Long Li <longli@microsoft.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/storvsc_drv.c