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

2016-12-11 Thread Wei Fang
Hi, James, On 2016/12/10 0:02, James Bottomley wrote: > On Fri, 2016-12-09 at 17:35 +0800, Wei Fang wrote: >> A scan work can run simultaneously with fc_remote_port_delete(). >> If a scsi device is added to the ->__devices list in the scan work, >> it can be touched and will be blocked in

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

2016-12-09 Thread James Bottomley
On Fri, 2016-12-09 at 17:35 +0800, Wei Fang wrote: > A scan work can run simultaneously with fc_remote_port_delete(). > If a scsi device is added to the ->__devices list in the scan work, > it can be touched and will be blocked in scsi_target_block(), which > will be called in

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

2016-12-09 Thread James Bottomley
On Fri, 2016-12-09 at 17:35 +0800, Wei Fang wrote: > diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h > index 8990e58..5c53cf5 100644 > --- a/include/scsi/scsi_device.h > +++ b/include/scsi/scsi_device.h > @@ -31,7 +31,7 @@ struct scsi_mode_data { > enum

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

2016-12-09 Thread Wei Fang
A scan work can run simultaneously with fc_remote_port_delete(). If a scsi device is added to the ->__devices list in the scan work, it can be touched and will be blocked in scsi_target_block(), which will be called in fc_remote_port_delete(), and QUEUE_FLAG_STOPPED flag will be setted to the scsi