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,
Martin Petermann <martin.petermann@de.ibm.com>,
Christof Schmitt <christof.schmitt@de.ibm.com>
Subject: [patch 13/15] zfcp: Fix port reference counting
Date: Fri, 17 Apr 2009 15:08:13 +0200 [thread overview]
Message-ID: <20090417131123.529354000@de.ibm.com> (raw)
In-Reply-To: 20090417130800.923944000@de.ibm.com
[-- Attachment #1: 713-zfcp-port-refcounting.diff --]
[-- Type: text/plain, Size: 1349 bytes --]
From: Martin Petermann <martin.petermann@de.ibm.com>
If this problem appears zfcp ports cannot be de-queued since it is
checked for a zero refcount. The port reference counting is wrong for
existing zfcp ports when e.g. an adapter gets on-line again. During
port scanning the reference counting for existing ports should not be
changed.
Signed-off-by: Martin Petermann <martin.petermann@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
---
drivers/s390/scsi/zfcp_fc.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--- a/drivers/s390/scsi/zfcp_fc.c 2009-04-17 15:03:46.000000000 +0200
+++ b/drivers/s390/scsi/zfcp_fc.c 2009-04-17 15:03:54.000000000 +0200
@@ -539,6 +539,9 @@ static void zfcp_validate_port(struct zf
{
struct zfcp_adapter *adapter = port->adapter;
+ if (!(atomic_read(&port->status) & ZFCP_STATUS_COMMON_NOESC))
+ return;
+
atomic_clear_mask(ZFCP_STATUS_COMMON_NOESC, &port->status);
if ((port->supported_classes != 0) ||
@@ -599,10 +602,8 @@ static int zfcp_scan_eval_gpn_ft(struct
if (acc->wwpn == fc_host_port_name(adapter->scsi_host))
continue;
port = zfcp_get_port_by_wwpn(adapter, acc->wwpn);
- if (port) {
- zfcp_port_get(port);
+ if (port)
continue;
- }
port = zfcp_port_enqueue(adapter, acc->wwpn,
ZFCP_STATUS_COMMON_NOESC, d_id);
next prev parent reply other threads:[~2009-04-17 13:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-17 13:08 [patch 00/15] zfcp fixes for 2.6.30-rc2 Christof Schmitt
2009-04-17 13:08 ` [patch 01/15] zfcp: Avoid referencing freed memory in req send Christof Schmitt
2009-04-17 13:08 ` [patch 02/15] zfcp: Enable auto-port discovery for NPIV Christof Schmitt
2009-04-17 13:08 ` [patch 03/15] zfcp: Dont call zfcp_fsf_req_free on NULL pointer Christof Schmitt
2009-04-17 13:08 ` [patch 04/15] zfcp: Dont block zfcp_wq with scan Christof Schmitt
2009-04-17 13:08 ` [patch 05/15] zfcp: Set WKA-port to offline on adapter deactivation Christof Schmitt
2009-04-17 13:08 ` [patch 06/15] zfcp: avoid false ERP complete due to sema race Christof Schmitt
2009-04-17 13:08 ` [patch 07/15] zfcp: no port recovery after storage side error inject Christof Schmitt
2009-04-17 13:08 ` [patch 08/15] zfcp: remove unit will fail if add unit is not finished Christof Schmitt
2009-04-17 13:08 ` [patch 09/15] zfcp: Let actcli handle control file errors Christof Schmitt
2009-04-17 13:08 ` [patch 10/15] zfcp: no port recovery after ADISC request timeout Christof Schmitt
2009-04-17 13:08 ` [patch 11/15] zfcp: Fix abort handler for completions in progress Christof Schmitt
2009-04-17 13:08 ` [patch 12/15] zfcp: revert previous patch for sbal counting Christof Schmitt
2009-04-17 13:08 ` Christof Schmitt [this message]
2009-04-17 13:08 ` [patch 14/15] zfcp: Reference counting for cfdc requests Christof Schmitt
2009-04-17 13:08 ` [patch 15/15] zfcp: Fix oops when port disappears 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=20090417131123.529354000@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=martin.petermann@de.ibm.com \
--cc=schwidefsky@de.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.