Re: [PATCH v12 5/6] Avoid that scsi_device_set_state() triggers a race

2013-07-01 Thread James Bottomley
On Thu, 2013-06-27 at 16:56 +0200, Bart Van Assche wrote: Make concurrent invocations of scsi_device_set_state() safe. Firstly, I don't understand from this where you think the races are. Secondly, shouldn't this be the device lock? and thirdly, if we accept that locking is required,

Re: [PATCH v12 5/6] Avoid that scsi_device_set_state() triggers a race

2013-07-01 Thread Bart Van Assche
On 07/01/13 16:49, James Bottomley wrote: On Thu, 2013-06-27 at 16:56 +0200, Bart Van Assche wrote: Make concurrent invocations of scsi_device_set_state() safe. Firstly, I don't understand from this where you think the races are. Secondly, shouldn't this be the device lock? and thirdly, if we

Re: [PATCH v12 5/6] Avoid that scsi_device_set_state() triggers a race

2013-07-01 Thread James Bottomley
On Mon, 2013-07-01 at 17:17 +0200, Bart Van Assche wrote: On 07/01/13 16:49, James Bottomley wrote: On Thu, 2013-06-27 at 16:56 +0200, Bart Van Assche wrote: Make concurrent invocations of scsi_device_set_state() safe. Firstly, I don't understand from this where you think the races are.

[PATCH v12 5/6] Avoid that scsi_device_set_state() triggers a race

2013-06-27 Thread Bart Van Assche
Make concurrent invocations of scsi_device_set_state() safe. Signed-off-by: Bart Van Assche bvanass...@acm.org Acked-by: Hannes Reinecke h...@suse.de Cc: James Bottomley jbottom...@parallels.com Cc: Tejun Heo t...@kernel.org Cc: Mike Christie micha...@cs.wisc.edu --- drivers/scsi/scsi_error.c |