Re: [PATCH v4] scsi: avoid a permanent stop of the scsi device's request queue

2016-12-14 Thread Martin K. Petersen
> "Wei" == Wei Fang writes: Wei> A race between scanning and fc_remote_port_delete() may result in a Wei> permanent stop if the device gets blocked before Wei> scsi_sysfs_add_sdev() and unblocked after. The reason is that Wei> blocking a device sets both the SDEV_BLOCKED state and the Wei> Q

[PATCH v4] scsi: avoid a permanent stop of the scsi device's request queue

2016-12-12 Thread Wei Fang
A race between scanning and fc_remote_port_delete() may result in a permanent stop if the device gets blocked before scsi_sysfs_add_sdev() and unblocked after. The reason is that blocking a device sets both the SDEV_BLOCKED state and the QUEUE_FLAG_STOPPED. However, scsi_sysfs_add_sdev() uncondit