• Cathy Avery's avatar
    scsi: storvsc: Allow only one remove lun work item to be issued per lun · 436ad941
    Cathy Avery authored
    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: default avatarCathy Avery <cavery@redhat.com>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    Reviewed-by: default avatarLong Li <longli@microsoft.com>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    436ad941
storvsc_drv.c 49.6 KB