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
..
2012-02-19 08:08:58 -06:00
2016-07-20 19:49:41 -04:00
2016-01-27 20:36:10 +08:00
2017-05-04 12:19:44 -07:00
2015-12-02 16:36:14 -05:00
2016-02-23 21:27:02 -05:00
2017-05-01 22:21:40 -07:00
2015-11-09 17:11:57 -08:00
2017-02-21 11:51:42 -08:00
2017-04-11 20:55:20 -04:00
2015-05-18 13:35:56 -04:00