scsi: libiscsi: Drop taskqueuelock
authorMike Christie <michael.christie@oracle.com>
Sun, 7 Feb 2021 04:46:01 +0000 (22:46 -0600)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 9 Feb 2021 03:39:03 +0000 (22:39 -0500)
commit5923d64b7ab63dcc6f0df946098f50902f9540d1
tree04d9f73f3ef9f69459fb084384f44ddb76fbe853
parentd28d48c699779973ab9a3bd0e5acfa112bd4fdef
scsi: libiscsi: Drop taskqueuelock

The purpose of the taskqueuelock was to handle the issue where a bad target
decides to send a R2T and before its data has been sent decides to send a
cmd response to complete the cmd. The following patches fix up the
frwd/back locks so they are taken from the queue/xmit (frwd) and completion
(back) paths again. To get there this patch removes the taskqueuelock which
for iSCSI xmit wq based drivers was taken in the queue, xmit and completion
paths.

Instead of the lock, we just make sure we have a ref to the task when we
queue a R2T, and then we always remove the task from the requeue list in
the xmit path or the forced cleanup paths.

Link: https://lore.kernel.org/r/20210207044608.27585-3-michael.christie@oracle.com
Reviewed-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/libiscsi.c
drivers/scsi/libiscsi_tcp.c
include/scsi/libiscsi.h