Re: [PATCH v12 2/6] Avoid calling __scsi_remove_device() twice

2013-07-01 Thread James Bottomley
On Mon, 2013-07-01 at 09:14 +0200, Bart Van Assche wrote:
> On 07/01/13 09:05, James Bottomley wrote:
> >
> > On Thu, 2013-06-27 at 16:53 +0200, Bart Van Assche wrote:
> >> If something goes wrong during LUN scanning, e.g. a transport layer
> >> failure occurs, then __scsi_remove_device() can get invoked by the
> >> LUN scanning code for a SCSI device in state SDEV_CREATED_BLOCK. If
> >> this happens then the SCSI device has not yet been added to sysfs
> >> (is_visible == 0).  Make sure that in that case the transition into
> >> state SDEV_DEL occurs. This avoids that __scsi_remove_device() gets
> >> invoked a second time by scsi_forget_host().
> >
> > The patch summary of this one isn't true.  How about "enable destruction
> > of blocked devices which fail LUN scanning"
> 
> Hello James,
> 
> Do you want me to repost the patch series or is this something you can 
> fix up ?

I can fix it up, but if you repost, please change it.

Thanks,

James

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v12 2/6] Avoid calling __scsi_remove_device() twice

2013-07-01 Thread Bart Van Assche

On 07/01/13 09:05, James Bottomley wrote:


On Thu, 2013-06-27 at 16:53 +0200, Bart Van Assche wrote:

If something goes wrong during LUN scanning, e.g. a transport layer
failure occurs, then __scsi_remove_device() can get invoked by the
LUN scanning code for a SCSI device in state SDEV_CREATED_BLOCK. If
this happens then the SCSI device has not yet been added to sysfs
(is_visible == 0).  Make sure that in that case the transition into
state SDEV_DEL occurs. This avoids that __scsi_remove_device() gets
invoked a second time by scsi_forget_host().


The patch summary of this one isn't true.  How about "enable destruction
of blocked devices which fail LUN scanning"


Hello James,

Do you want me to repost the patch series or is this something you can 
fix up ?


Thanks,

Bart.

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v12 2/6] Avoid calling __scsi_remove_device() twice

2013-07-01 Thread James Bottomley

On Thu, 2013-06-27 at 16:53 +0200, Bart Van Assche wrote:
> If something goes wrong during LUN scanning, e.g. a transport layer
> failure occurs, then __scsi_remove_device() can get invoked by the
> LUN scanning code for a SCSI device in state SDEV_CREATED_BLOCK. If
> this happens then the SCSI device has not yet been added to sysfs
> (is_visible == 0).  Make sure that in that case the transition into
> state SDEV_DEL occurs. This avoids that __scsi_remove_device() gets
> invoked a second time by scsi_forget_host().

The patch summary of this one isn't true.  How about "enable destruction
of blocked devices which fail LUN scanning"

James


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v12 2/6] Avoid calling __scsi_remove_device() twice

2013-06-27 Thread Bart Van Assche
If something goes wrong during LUN scanning, e.g. a transport layer
failure occurs, then __scsi_remove_device() can get invoked by the
LUN scanning code for a SCSI device in state SDEV_CREATED_BLOCK. If
this happens then the SCSI device has not yet been added to sysfs
(is_visible == 0).  Make sure that in that case the transition into
state SDEV_DEL occurs. This avoids that __scsi_remove_device() gets
invoked a second time by scsi_forget_host().

Signed-off-by: Bart Van Assche 
Cc: James Bottomley 
Cc: Mike Christie 
Cc: Hannes Reinecke 
Cc: Tejun Heo 
---
 drivers/scsi/scsi_lib.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index df8bd5a..124392f 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -2193,6 +2193,7 @@ scsi_device_set_state(struct scsi_device *sdev, enum 
scsi_device_state state)
case SDEV_OFFLINE:
case SDEV_TRANSPORT_OFFLINE:
case SDEV_CANCEL:
+   case SDEV_CREATED_BLOCK:
break;
default:
goto illegal;
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html