All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christof Schmitt <christof.schmitt@de.ibm.com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: linux-scsi@vger.kernel.org, linux-s390@vger.kernel.org,
	schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com,
	Swen Schillig <swen@vnet.ibm.com>,
	Christof Schmitt <christof.schmitt@de.ibm.com>
Subject: [patch 11/13] zfcp: avoid double notify in lowmem scenario
Date: Mon, 13 Jul 2009 15:06:12 +0200	[thread overview]
Message-ID: <20090713131044.125071000@de.ibm.com> (raw)
In-Reply-To: 20090713130601.304914000@de.ibm.com

[-- Attachment #1: 718-zfcp-double-notify.diff --]
[-- Type: text/plain, Size: 1230 bytes --]

From: Swen Schillig <swen@vnet.ibm.com>

In a LOWMEM condition an ERP notification would have been sent twice
causing an unpredictable behaviour of the ERP.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
---

 drivers/s390/scsi/zfcp_erp.c |   14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff -urpN linux-2.6/drivers/s390/scsi/zfcp_erp.c linux-2.6-patched/drivers/s390/scsi/zfcp_erp.c
--- linux-2.6/drivers/s390/scsi/zfcp_erp.c	2009-07-12 21:09:01.000000000 +0200
+++ linux-2.6-patched/drivers/s390/scsi/zfcp_erp.c	2009-07-12 21:09:03.000000000 +0200
@@ -848,11 +848,17 @@ void zfcp_erp_port_strategy_open_lookup(
 					      gid_pn_work);
 
 	retval = zfcp_fc_ns_gid_pn(&port->erp_action);
-	if (retval == -ENOMEM)
+	if (!retval) {
+		port->erp_action.step = ZFCP_ERP_STEP_NAMESERVER_LOOKUP;
+		goto out;
+	}
+	if (retval == -ENOMEM) {
 		zfcp_erp_notify(&port->erp_action, ZFCP_STATUS_ERP_LOWMEM);
-	port->erp_action.step = ZFCP_ERP_STEP_NAMESERVER_LOOKUP;
-	if (retval)
-		zfcp_erp_notify(&port->erp_action, 0);
+		goto out;
+	}
+	/* all other error condtions */
+	zfcp_erp_notify(&port->erp_action, 0);
+out:
 	zfcp_port_put(port);
 }
 

  parent reply	other threads:[~2009-07-13 13:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-13 13:06 [patch 00/13] zfcp fixes for 2.6.31-rc2 Christof Schmitt
2009-07-13 13:06 ` [patch 01/13] zfcp: Fix invalid command order Christof Schmitt
2009-07-13 13:06 ` [patch 02/13] zfcp: Acquire qdio_stat_lock when reading the queue utilization Christof Schmitt
2009-07-13 13:06 ` [patch 03/13] zfcp: Return -ENOMEM for allocation failures in zfcp_fsf Christof Schmitt
2009-07-13 13:06 ` [patch 04/13] zfcp: Use correct flags for zfcp_erp_notify Christof Schmitt
2009-07-13 13:06 ` [patch 05/13] zfcp: Use unchained mode for small ct and els requests Christof Schmitt
2009-07-13 13:06 ` [patch 06/13] zfcp: Use -EIO for SBAL allocation failures Christof Schmitt
2009-07-13 13:06 ` [patch 07/13] zfcp: Fix logic for physical port close Christof Schmitt
2009-07-13 13:06 ` [patch 08/13] zfcp: Fix erp escalation procedure Christof Schmitt
2009-07-13 13:06 ` [patch 09/13] zfcp: Recover from stalled outbound queue Christof Schmitt
2009-07-13 13:06 ` [patch 10/13] zfcp: Add port only once to FC transport class Christof Schmitt
2009-07-13 13:06 ` Christof Schmitt [this message]
2009-07-13 13:06 ` [patch 12/13] zfcp: Fix wka port processing Christof Schmitt
2009-07-13 13:06 ` [patch 13/13] zfcp: Fix tracing of request id for abort requests Christof Schmitt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090713131044.125071000@de.ibm.com \
    --to=christof.schmitt@de.ibm.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=swen@vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.