public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] zfcp: IO stall after path checker changes
@ 2007-05-29 13:29 Swen Schillig
  2007-05-29 13:55 ` Swen Schillig
  0 siblings, 1 reply; 5+ messages in thread
From: Swen Schillig @ 2007-05-29 13:29 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi, linux-s390, mloehr2

From: Michael Loehr <mloehr2@linux.vnet.ibm.com>

Devices corresponding to a deleted unit are never freed.
This has the effect that slave_destroy is never called and zfcp
'thinks' that this unit is still registered.
This patch changes the zfcp behaviour the way that the
rport and sdev are not deleted anymore. The host is set to
block on 'offline'. Host online is only removing the blocked status 
and everything works as expected again.

Signed-off-by: Michael Loehr <mloehr2@linux.vnet.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>

---

 drivers/s390/scsi/zfcp_aux.c  |    1 +
 drivers/s390/scsi/zfcp_ccw.c  |    5 +----
 drivers/s390/scsi/zfcp_scsi.c |    3 +++
 3 files changed, 5 insertions(+), 4 deletions(-)

Index: linux_jb_patched/drivers/s390/scsi/zfcp_aux.c
===================================================================
--- linux_jb_patched.orig/drivers/s390/scsi/zfcp_aux.c
+++ linux_jb_patched/drivers/s390/scsi/zfcp_aux.c
@@ -1127,6 +1127,7 @@ zfcp_adapter_dequeue(struct zfcp_adapter
 	int retval = 0;
 	unsigned long flags;
 
+	zfcp_adapter_scsi_unregister(adapter);
 	device_unregister(&adapter->generic_services);
 	zfcp_sysfs_adapter_remove_files(&adapter->ccw_device->dev);
 	dev_set_drvdata(&adapter->ccw_device->dev, NULL);
Index: linux_jb_patched/drivers/s390/scsi/zfcp_ccw.c
===================================================================
--- linux_jb_patched.orig/drivers/s390/scsi/zfcp_ccw.c
+++ linux_jb_patched/drivers/s390/scsi/zfcp_ccw.c
@@ -189,9 +189,7 @@ zfcp_ccw_set_online(struct ccw_device *c
  * @ccw_device: pointer to belonging ccw device
  *
  * This function gets called by the common i/o layer and sets an adapter
- * into state offline. Setting an fcp device offline means that it will be
- * unregistered from the SCSI stack and that the adapter will be shut down
- * asynchronously.
+ * into state offline.
  */
 static int
 zfcp_ccw_set_offline(struct ccw_device *ccw_device)
@@ -202,7 +200,6 @@ zfcp_ccw_set_offline(struct ccw_device *
 	adapter = dev_get_drvdata(&ccw_device->dev);
 	zfcp_erp_adapter_shutdown(adapter, 0);
 	zfcp_erp_wait(adapter);
-	zfcp_adapter_scsi_unregister(adapter);
 	zfcp_erp_thread_kill(adapter);
 	zfcp_adapter_debug_unregister(adapter);
 	up(&zfcp_data.config_sema);
Index: linux_jb_patched/drivers/s390/scsi/zfcp_scsi.c
===================================================================
--- linux_jb_patched.orig/drivers/s390/scsi/zfcp_scsi.c
+++ linux_jb_patched/drivers/s390/scsi/zfcp_scsi.c
@@ -569,6 +569,9 @@ zfcp_adapter_scsi_register(struct zfcp_a
 	int retval = 0;
 	static unsigned int unique_id = 0;
 
+	if (adapter->scsi_host)
+		goto out;
+
 	/* register adapter as SCSI host with mid layer of SCSI stack */
 	adapter->scsi_host = scsi_host_alloc(&zfcp_data.scsi_host_template,
 					     sizeof (struct zfcp_adapter *));

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/3] zfcp: IO stall after path checker changes
  2007-05-29 13:29 [PATCH 1/3] zfcp: IO stall after path checker changes Swen Schillig
@ 2007-05-29 13:55 ` Swen Schillig
  2007-05-29 15:51   ` James Bottomley
  0 siblings, 1 reply; 5+ messages in thread
From: Swen Schillig @ 2007-05-29 13:55 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi, linux-s390, mloehr2

James

I just saw that I posted this patch on 9th already, 
but todays git pull from your tree didn't show the inclusion of this one (and another patch posted the same day).
Event though it's reported in your summary from the 26 !
If I'm to quick then I'm sorry for sending it twice, if there's any other
reason for this patch to not be included please let me know.

Thanks
	Swen
On Tuesday 29 May 2007 15:29, Swen Schillig wrote:
> From: Michael Loehr <mloehr2@linux.vnet.ibm.com>
> 
> Devices corresponding to a deleted unit are never freed.
> This has the effect that slave_destroy is never called and zfcp
> 'thinks' that this unit is still registered.
> This patch changes the zfcp behaviour the way that the
> rport and sdev are not deleted anymore. The host is set to
> block on 'offline'. Host online is only removing the blocked status 
> and everything works as expected again.
> 
> Signed-off-by: Michael Loehr <mloehr2@linux.vnet.ibm.com>
> Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
> 
> ---
> 
>  drivers/s390/scsi/zfcp_aux.c  |    1 +
>  drivers/s390/scsi/zfcp_ccw.c  |    5 +----
>  drivers/s390/scsi/zfcp_scsi.c |    3 +++
>  3 files changed, 5 insertions(+), 4 deletions(-)
> 
> Index: linux_jb_patched/drivers/s390/scsi/zfcp_aux.c
> ===================================================================
> --- linux_jb_patched.orig/drivers/s390/scsi/zfcp_aux.c
> +++ linux_jb_patched/drivers/s390/scsi/zfcp_aux.c
> @@ -1127,6 +1127,7 @@ zfcp_adapter_dequeue(struct zfcp_adapter
>  	int retval = 0;
>  	unsigned long flags;
>  
> +	zfcp_adapter_scsi_unregister(adapter);
>  	device_unregister(&adapter->generic_services);
>  	zfcp_sysfs_adapter_remove_files(&adapter->ccw_device->dev);
>  	dev_set_drvdata(&adapter->ccw_device->dev, NULL);
> Index: linux_jb_patched/drivers/s390/scsi/zfcp_ccw.c
> ===================================================================
> --- linux_jb_patched.orig/drivers/s390/scsi/zfcp_ccw.c
> +++ linux_jb_patched/drivers/s390/scsi/zfcp_ccw.c
> @@ -189,9 +189,7 @@ zfcp_ccw_set_online(struct ccw_device *c
>   * @ccw_device: pointer to belonging ccw device
>   *
>   * This function gets called by the common i/o layer and sets an adapter
> - * into state offline. Setting an fcp device offline means that it will be
> - * unregistered from the SCSI stack and that the adapter will be shut down
> - * asynchronously.
> + * into state offline.
>   */
>  static int
>  zfcp_ccw_set_offline(struct ccw_device *ccw_device)
> @@ -202,7 +200,6 @@ zfcp_ccw_set_offline(struct ccw_device *
>  	adapter = dev_get_drvdata(&ccw_device->dev);
>  	zfcp_erp_adapter_shutdown(adapter, 0);
>  	zfcp_erp_wait(adapter);
> -	zfcp_adapter_scsi_unregister(adapter);
>  	zfcp_erp_thread_kill(adapter);
>  	zfcp_adapter_debug_unregister(adapter);
>  	up(&zfcp_data.config_sema);
> Index: linux_jb_patched/drivers/s390/scsi/zfcp_scsi.c
> ===================================================================
> --- linux_jb_patched.orig/drivers/s390/scsi/zfcp_scsi.c
> +++ linux_jb_patched/drivers/s390/scsi/zfcp_scsi.c
> @@ -569,6 +569,9 @@ zfcp_adapter_scsi_register(struct zfcp_a
>  	int retval = 0;
>  	static unsigned int unique_id = 0;
>  
> +	if (adapter->scsi_host)
> +		goto out;
> +
>  	/* register adapter as SCSI host with mid layer of SCSI stack */
>  	adapter->scsi_host = scsi_host_alloc(&zfcp_data.scsi_host_template,
>  					     sizeof (struct zfcp_adapter *));
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/3] zfcp: IO stall after path checker changes
  2007-05-29 13:55 ` Swen Schillig
@ 2007-05-29 15:51   ` James Bottomley
  2007-05-29 15:54     ` James Bottomley
  0 siblings, 1 reply; 5+ messages in thread
From: James Bottomley @ 2007-05-29 15:51 UTC (permalink / raw)
  To: Swen Schillig; +Cc: linux-scsi, linux-s390, mloehr2

On Tue, 2007-05-29 at 15:55 +0200, Swen Schillig wrote:
> I just saw that I posted this patch on 9th already, 
> but todays git pull from your tree didn't show the inclusion of this one (and another patch posted the same day).
> Event though it's reported in your summary from the 26 !
> If I'm to quick then I'm sorry for sending it twice, if there's any other
> reason for this patch to not be included please let me know.

Sorry ... must have missed it.  I'll add it to rc-fixes (unfortunately I
need linus to pull before I can push into this tree, so there'll be a
slight delay).

James



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/3] zfcp: IO stall after path checker changes
  2007-05-29 15:51   ` James Bottomley
@ 2007-05-29 15:54     ` James Bottomley
  2007-05-30  6:36       ` Swen Schillig
  0 siblings, 1 reply; 5+ messages in thread
From: James Bottomley @ 2007-05-29 15:54 UTC (permalink / raw)
  To: Swen Schillig; +Cc: linux-scsi, linux-s390, mloehr2

On Tue, 2007-05-29 at 10:51 -0500, James Bottomley wrote:
> On Tue, 2007-05-29 at 15:55 +0200, Swen Schillig wrote:
> > I just saw that I posted this patch on 9th already, 
> > but todays git pull from your tree didn't show the inclusion of this one (and another patch posted the same day).
> > Event though it's reported in your summary from the 26 !
> > If I'm to quick then I'm sorry for sending it twice, if there's any other
> > reason for this patch to not be included please let me know.
> 
> Sorry ... must have missed it.  I'll add it to rc-fixes (unfortunately I
> need linus to pull before I can push into this tree, so there'll be a
> slight delay).

Actually, forget that; this is it, isn't it?

http://git.kernel.org/?p=linux/kernel/git/jejb/scsi-rc-fixes-2.6.git;a=commit;h=9f28745a6b554fdd6b0dbc9856077701a55f9569

In which case it's awaiting a pull into Linus' tree head.

James


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/3] zfcp: IO stall after path checker changes
  2007-05-29 15:54     ` James Bottomley
@ 2007-05-30  6:36       ` Swen Schillig
  0 siblings, 0 replies; 5+ messages in thread
From: Swen Schillig @ 2007-05-30  6:36 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi, linux-s390, mloehr2

On Tuesday 29 May 2007 17:54, James Bottomley wrote:
> On Tue, 2007-05-29 at 10:51 -0500, James Bottomley wrote:
> > On Tue, 2007-05-29 at 15:55 +0200, Swen Schillig wrote:
> > > I just saw that I posted this patch on 9th already, 
> > > but todays git pull from your tree didn't show the inclusion of this one (and another patch posted the same day).
> > > Event though it's reported in your summary from the 26 !
> > > If I'm to quick then I'm sorry for sending it twice, if there's any other
> > > reason for this patch to not be included please let me know.
> > 
> > Sorry ... must have missed it.  I'll add it to rc-fixes (unfortunately I
> > need linus to pull before I can push into this tree, so there'll be a
> > slight delay).
> 
> Actually, forget that; this is it, isn't it?
> 
> http://git.kernel.org/?p=linux/kernel/git/jejb/scsi-rc-fixes-2.6.git;a=commit;h=9f28745a6b554fdd6b0dbc9856077701a55f9569
> 
> In which case it's awaiting a pull into Linus' tree head.
> 
> James
> 
> 
Yeah, that's it.

Thanks.

Swen

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-05-30  6:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-29 13:29 [PATCH 1/3] zfcp: IO stall after path checker changes Swen Schillig
2007-05-29 13:55 ` Swen Schillig
2007-05-29 15:51   ` James Bottomley
2007-05-29 15:54     ` James Bottomley
2007-05-30  6:36       ` Swen Schillig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox