diff options
author | Bart Van Assche <[email protected]> | 2019-06-17 08:18:19 -0700 |
---|---|---|
committer | Martin K. Petersen <[email protected]> | 2019-06-20 15:37:02 -0400 |
commit | bbe9fb0d04b96dda1fd7bd973e094004978b2166 (patch) | |
tree | ef796d2beef86a4d838ff4c0e47a2c26af82c852 /lib/mpi/mpi-internal.h | |
parent | ac88c1f6730e73771dc36b9fd83804e7aa15941a (diff) |
scsi: Avoid that .queuecommand() gets called for a blocked SCSI device
Several SCSI transport and LLD drivers surround code that does not
tolerate concurrent calls of .queuecommand() with scsi_target_block() /
scsi_target_unblock(). These last two functions use
blk_mq_quiesce_queue() / blk_mq_unquiesce_queue() for scsi-mq request
queues to prevent concurrent .queuecommand() calls. However, that is
not sufficient to prevent .queuecommand() calls from scsi_send_eh_cmnd().
Hence surround the .queuecommand() call from the SCSI error handler with
code that avoids that .queuecommand() gets called in the blocked state.
Note: converting the .queuecommand() call in scsi_send_eh_cmnd() into
code that calls blk_get_request() + blk_execute_rq() is not an option
since scsi_send_eh_cmnd() must be able to make forward progress even
if all requests have been allocated.
Cc: Ming Lei <[email protected]>
Cc: Hannes Reinecke <[email protected]>
Cc: Johannes Thumshirn <[email protected]>
Signed-off-by: Bart Van Assche <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-internal.h')
0 files changed, 0 insertions, 0 deletions