]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - src/patches/suse-2.6.27.31/patches.arch/s390-12-12-zfcp_wka_wait_refcount.patch
Reenabled linux-xen, added patches for Xen Kernel Version 2.6.27.31,
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.arch / s390-12-12-zfcp_wka_wait_refcount.patch
diff --git a/src/patches/suse-2.6.27.31/patches.arch/s390-12-12-zfcp_wka_wait_refcount.patch b/src/patches/suse-2.6.27.31/patches.arch/s390-12-12-zfcp_wka_wait_refcount.patch
new file mode 100644 (file)
index 0000000..d491739
--- /dev/null
@@ -0,0 +1,34 @@
+From: Gerald Schaefer <geraldsc@de.ibm.com>
+Subject: zfcp: deadlock between scheduled task, ERP and scan_work
+References: bnc#487755,LTC#52845 
+
+Symptom:     I/O stalls due to a pending ERP action.
+Problem:     Under certain timing constraints a deadlock can prevent
+             the ERP to finish. The ERP is trying to force the wka
+             port offline waiting for the scheduled work to finish.
+             The scheduled work is waiting for the refcount to 
+             turn zero and another task is waiting for the ERP to 
+             finish before descrementing the refcounter. ->deadlock
+Solution:    Don't wait for the refcount to turn zero. If required
+             the wka port offline function is called again later.
+
+Acked-by: John Jolly <jjolly@suse.de>
+
+---
+ drivers/s390/scsi/zfcp_fc.c |    3 ---
+ 1 file changed, 3 deletions(-)
+
+Index: linux-sles11/drivers/s390/scsi/zfcp_fc.c
+===================================================================
+--- linux-sles11.orig/drivers/s390/scsi/zfcp_fc.c
++++ linux-sles11/drivers/s390/scsi/zfcp_fc.c
+@@ -75,9 +75,6 @@ static void zfcp_wka_port_offline(struct
+       struct zfcp_wka_port *wka_port =
+                       container_of(dw, struct zfcp_wka_port, work);
+-      wait_event(wka_port->completion_wq,
+-                      atomic_read(&wka_port->refcount) == 0);
+-
+       mutex_lock(&wka_port->mutex);
+       if ((atomic_read(&wka_port->refcount) != 0) ||
+           (wka_port->status != ZFCP_WKA_PORT_ONLINE))