Bart Van Assche 0db6ca8a5e scsi: Protect SCSI device state changes with a mutex
Serializing SCSI device state changes avoids that two state changes can
occur concurrently, e.g. the state changes in scsi_target_block() and
__scsi_remove_device(). This serialization is essential to make patch
"Make __scsi_remove_device go straight from BLOCKED to DEL" work
reliably.

Enable this mechanism for all scsi_target_*block() callers but not for
the scsi_internal_device_unblock() calls from the mpt3sas driver because
that driver can call scsi_internal_device_unblock() from atomic context.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-06-12 20:55:59 -04:00
..
2017-06-09 22:30:55 -07:00
2017-06-01 14:49:47 -04:00
2017-05-05 19:33:07 -07:00
2017-06-06 09:37:44 -07:00
2017-04-27 11:54:49 +01:00
2017-06-11 11:29:15 -07:00
2017-04-20 09:54:24 +02:00
2017-05-09 10:01:15 -07:00
2017-05-04 19:15:35 -07:00
2017-06-11 11:25:51 -07:00
2017-05-18 23:54:47 -07:00
2017-06-04 10:23:25 +02:00
2017-06-03 09:47:16 +09:00
2017-05-05 11:36:44 -07:00
2017-05-11 11:12:26 -07:00
2017-06-09 09:59:51 -07:00