diff options
author | Michael Loehr <mloehr2@linux.vnet.ibm.com> | 2007-05-09 05:01:24 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-05-16 10:01:38 -0400 |
commit | 9f28745a6b554fdd6b0dbc9856077701a55f9569 (patch) | |
tree | f6d2a50b25f00300a5df5d132200f009e5069e7f | |
parent | 869b2b444c58302e3233ce0b671fabf28135a37d (diff) |
[SCSI] zfcp: IO stall after deleting and path checker changes after reenabling zfcp devices
IO stall after deleting and path checker changes after reenabling zfcp device
Setting one zfcp device offline using chccwdev in a multipath
environment and waiting will lead to IO stall on all paths.
After setting the zfcp device back online using chccwdev,
the devices with io stall will have a different path checker.
Devices corresponding to the deleted units are never freed.
This has the effect that 'slave_destroy' is never called and zfcp
still thinks that this unit is registered
(ZFCP_STATUS_UNIT_REGISTERED is still set). Hence the erp
routine is not called correctly and the unit is not enabled properly.
Do not delete rport and the sdev. Just set the host to block on
'offline'. Setting host online again will then remove the blocked status
and everything is fine again.
Signed-off-by: Michael Loehr <mloehr2@linux.vnet.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
-rw-r--r-- | drivers/s390/scsi/zfcp_aux.c | 1 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_ccw.c | 5 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_scsi.c | 3 |
3 files changed, 5 insertions, 4 deletions
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index ddff40c4212c..821cde65e369 100644 --- a/drivers/s390/scsi/zfcp_aux.c +++ b/drivers/s390/scsi/zfcp_aux.c | |||
@@ -1127,6 +1127,7 @@ zfcp_adapter_dequeue(struct zfcp_adapter *adapter) | |||
1127 | int retval = 0; | 1127 | int retval = 0; |
1128 | unsigned long flags; | 1128 | unsigned long flags; |
1129 | 1129 | ||
1130 | zfcp_adapter_scsi_unregister(adapter); | ||
1130 | device_unregister(&adapter->generic_services); | 1131 | device_unregister(&adapter->generic_services); |
1131 | zfcp_sysfs_adapter_remove_files(&adapter->ccw_device->dev); | 1132 | zfcp_sysfs_adapter_remove_files(&adapter->ccw_device->dev); |
1132 | dev_set_drvdata(&adapter->ccw_device->dev, NULL); | 1133 | dev_set_drvdata(&adapter->ccw_device->dev, NULL); |
diff --git a/drivers/s390/scsi/zfcp_ccw.c b/drivers/s390/scsi/zfcp_ccw.c index 81680efa1721..1c8f71a59855 100644 --- a/drivers/s390/scsi/zfcp_ccw.c +++ b/drivers/s390/scsi/zfcp_ccw.c | |||
@@ -189,9 +189,7 @@ zfcp_ccw_set_online(struct ccw_device *ccw_device) | |||
189 | * @ccw_device: pointer to belonging ccw device | 189 | * @ccw_device: pointer to belonging ccw device |
190 | * | 190 | * |
191 | * This function gets called by the common i/o layer and sets an adapter | 191 | * This function gets called by the common i/o layer and sets an adapter |
192 | * into state offline. Setting an fcp device offline means that it will be | 192 | * into state offline. |
193 | * unregistered from the SCSI stack and that the adapter will be shut down | ||
194 | * asynchronously. | ||
195 | */ | 193 | */ |
196 | static int | 194 | static int |
197 | zfcp_ccw_set_offline(struct ccw_device *ccw_device) | 195 | zfcp_ccw_set_offline(struct ccw_device *ccw_device) |
@@ -202,7 +200,6 @@ zfcp_ccw_set_offline(struct ccw_device *ccw_device) | |||
202 | adapter = dev_get_drvdata(&ccw_device->dev); | 200 | adapter = dev_get_drvdata(&ccw_device->dev); |
203 | zfcp_erp_adapter_shutdown(adapter, 0); | 201 | zfcp_erp_adapter_shutdown(adapter, 0); |
204 | zfcp_erp_wait(adapter); | 202 | zfcp_erp_wait(adapter); |
205 | zfcp_adapter_scsi_unregister(adapter); | ||
206 | zfcp_erp_thread_kill(adapter); | 203 | zfcp_erp_thread_kill(adapter); |
207 | zfcp_adapter_debug_unregister(adapter); | 204 | zfcp_adapter_debug_unregister(adapter); |
208 | up(&zfcp_data.config_sema); | 205 | up(&zfcp_data.config_sema); |
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index 16e2d64658af..0acf6db0a08d 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c | |||
@@ -569,6 +569,9 @@ zfcp_adapter_scsi_register(struct zfcp_adapter *adapter) | |||
569 | int retval = 0; | 569 | int retval = 0; |
570 | static unsigned int unique_id = 0; | 570 | static unsigned int unique_id = 0; |
571 | 571 | ||
572 | if (adapter->scsi_host) | ||
573 | goto out; | ||
574 | |||
572 | /* register adapter as SCSI host with mid layer of SCSI stack */ | 575 | /* register adapter as SCSI host with mid layer of SCSI stack */ |
573 | adapter->scsi_host = scsi_host_alloc(&zfcp_data.scsi_host_template, | 576 | adapter->scsi_host = scsi_host_alloc(&zfcp_data.scsi_host_template, |
574 | sizeof (struct zfcp_adapter *)); | 577 | sizeof (struct zfcp_adapter *)); |