]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: target: core: Flush submission work during TMR processing
authorMike Christie <michael.christie@oracle.com>
Sat, 27 Feb 2021 17:00:05 +0000 (11:00 -0600)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 4 Mar 2021 22:37:02 +0000 (17:37 -0500)
commitf4b561f5a3b9232b76c91cc3b99e51a780b6c769
treee606cbbcccf728dea7eb57e2ecc6a797232220ad
parent45f1a04442920d1839a040a264ee7d7a19527c17
scsi: target: core: Flush submission work during TMR processing

If a cmd is on the submission workqueue then the TMR code will miss it, and
end up returning task not found or success for LUN resets. The fabric
driver might then tell the initiator that the running cmds have been
handled when they are about to run.

This adds a flush when we are processing TMRs to make sure queued cmds do
not run after returning the TMR response.

Link: https://lore.kernel.org/r/20210227170006.5077-25-michael.christie@oracle.com
Tested-by: Laurence Oberman <loberman@redhat.com>
Reviewed-by: Bodo Stroesser <bostroesser@gmail.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/target/target_core_tmr.c