summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_sli.h
diff options
context:
space:
mode:
authorJames Smart <jsmart2021@gmail.com>2019-01-28 20:14:37 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2019-02-06 04:29:50 +0100
commitc2017260eea2db62e7bb1b7cbb1759f1d11ed067 (patch)
tree84c8dea1d70f6e8483404ec4e325114e1566305c /drivers/scsi/lpfc/lpfc_sli.h
parentscsi: lpfc: Enable SCSI and NVME fc4s by default (diff)
downloadlinux-c2017260eea2db62e7bb1b7cbb1759f1d11ed067.tar.xz
linux-c2017260eea2db62e7bb1b7cbb1759f1d11ed067.zip
scsi: lpfc: Rework locking on SCSI io completion
A scsi host lock is taken on every io completion to check whether the abort handler is waiting on the io completion. This is an expensive lock to take on all completion when rarely in an abort condition. Replace scsi host lock with command-specific lock. Synchronize completion and abort paths by new cmd lock. Ensure all flag changing and nulling of context pointers taken under lock. When adding lock to task management abort, realized it was missing other synchronization locks. Added that synchronization to match normal paths. Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_sli.h')
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.h b/drivers/scsi/lpfc/lpfc_sli.h
index 658a40d3b1a2..d203a666497f 100644
--- a/drivers/scsi/lpfc/lpfc_sli.h
+++ b/drivers/scsi/lpfc/lpfc_sli.h
@@ -387,6 +387,7 @@ struct lpfc_io_buf {
* to dma_unmap_sg.
*/
unsigned long start_time;
+ spinlock_t buf_lock; /* lock used in case of simultaneous abort */
bool expedite; /* this is an expedite io_buf */
union {