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

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