scsi: target: Make state_list per CPU
authorMike Christie <michael.christie@oracle.com>
Sun, 1 Nov 2020 18:59:33 +0000 (12:59 -0600)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 5 Nov 2020 03:39:38 +0000 (22:39 -0500)
commit1526d9f10c6184031e42afad0adbdde1213e8ad1
tree11d7de3c7d694af86399e8b9458a13f5943a6840
parent6f55b06f9b0722607cbac2140875d790395435f2
scsi: target: Make state_list per CPU

Do a state_list/execute_task_lock per CPU, so we can do submissions from
different CPUs without contention with each other.

Note: tcm_fc was passing TARGET_SCF_USE_CPUID, but never set cpuid.  The
assumption is that it wanted to set the cpuid to the CPU it was submitting
from so it will get this behavior with this patch.

[mkp: s/printk/pr_err/ + resolve COMPARE AND WRITE patch conflict]

Link: https://lore.kernel.org/r/1604257174-4524-8-git-send-email-michael.christie@oracle.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/target/target_core_device.c
drivers/target/target_core_tmr.c
drivers/target/target_core_transport.c
drivers/target/tcm_fc/tfc_cmd.c
include/target/target_core_base.h