From: Christof Schmitt <christof.schmitt@de.ibm.com>
To: James Bottomley <James.Bottomley@suse.de>
Cc: linux-scsi@vger.kernel.org, linux-s390@vger.kernel.org,
schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com,
Christof Schmitt <christof.schmitt@de.ibm.com>
Subject: [patch 06/11] zfcp: Dont use 0 to indicate invalid LUN in rec trace
Date: Wed, 17 Feb 2010 11:18:54 +0100 [thread overview]
Message-ID: <20100217102018.671750000@de.ibm.com> (raw)
In-Reply-To: 20100217101848.662299000@de.ibm.com
[-- Attachment #1: 706-zfcp-invalid-lun.diff --]
[-- Type: text/plain, Size: 2356 bytes --]
From: Christof Schmitt <christof.schmitt@de.ibm.com>
0 is a valid value for a LUN. It is slightly confusing to also see 0
in the trace entries relating to adapter and port. Change this to use
0xFFFFFFFFFFFFFFFF in the LUN field when the trace entry does not
relate to a LUN or unit.
Reviewed-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
---
drivers/s390/scsi/zfcp_dbf.c | 12 ++++++------
drivers/s390/scsi/zfcp_dbf.h | 2 ++
2 files changed, 8 insertions(+), 6 deletions(-)
diff -urpN linux-2.6/drivers/s390/scsi/zfcp_dbf.c linux-2.6-patched/drivers/s390/scsi/zfcp_dbf.c
--- linux-2.6/drivers/s390/scsi/zfcp_dbf.c 2010-02-16 09:43:29.000000000 +0100
+++ linux-2.6-patched/drivers/s390/scsi/zfcp_dbf.c 2010-02-16 09:43:30.000000000 +0100
@@ -576,7 +576,8 @@ void zfcp_dbf_rec_adapter(char *id, void
struct zfcp_adapter *adapter = dbf->adapter;
zfcp_dbf_rec_target(id, ref, dbf, &adapter->status,
- &adapter->erp_counter, 0, 0, 0);
+ &adapter->erp_counter, 0, 0,
+ ZFCP_DBF_INVALID_LUN);
}
/**
@@ -590,8 +591,8 @@ void zfcp_dbf_rec_port(char *id, void *r
struct zfcp_dbf *dbf = port->adapter->dbf;
zfcp_dbf_rec_target(id, ref, dbf, &port->status,
- &port->erp_counter, port->wwpn, port->d_id,
- 0);
+ &port->erp_counter, port->wwpn, port->d_id,
+ ZFCP_DBF_INVALID_LUN);
}
/**
@@ -642,10 +643,9 @@ void zfcp_dbf_rec_trigger(char *id2, voi
r->u.trigger.ps = atomic_read(&port->status);
r->u.trigger.wwpn = port->wwpn;
}
- if (unit) {
+ if (unit)
r->u.trigger.us = atomic_read(&unit->status);
- r->u.trigger.fcp_lun = unit->fcp_lun;
- }
+ r->u.trigger.fcp_lun = unit ? unit->fcp_lun : ZFCP_DBF_INVALID_LUN;
debug_event(dbf->rec, action ? 1 : 4, r, sizeof(*r));
spin_unlock_irqrestore(&dbf->rec_lock, flags);
}
diff -urpN linux-2.6/drivers/s390/scsi/zfcp_dbf.h linux-2.6-patched/drivers/s390/scsi/zfcp_dbf.h
--- linux-2.6/drivers/s390/scsi/zfcp_dbf.h 2010-02-16 09:43:30.000000000 +0100
+++ linux-2.6-patched/drivers/s390/scsi/zfcp_dbf.h 2010-02-16 09:43:30.000000000 +0100
@@ -30,6 +30,8 @@
#define ZFCP_DBF_TAG_SIZE 4
#define ZFCP_DBF_ID_SIZE 7
+#define ZFCP_DBF_INVALID_LUN 0xFFFFFFFFFFFFFFFFull
+
struct zfcp_dbf_dump {
u8 tag[ZFCP_DBF_TAG_SIZE];
u32 total_size; /* size of total dump data */
next prev parent reply other threads:[~2010-02-17 10:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-17 10:18 [patch 00/11] zfcp updates for 2.6.34 Christof Schmitt
2010-02-17 10:18 ` [patch 01/11] zfcp: Remove function zfcp_reqlist_find_safe Christof Schmitt
2010-02-17 10:18 ` [patch 02/11] zfcp: Move FSF request tracking code to new file Christof Schmitt
2010-02-17 10:18 ` [patch 03/11] zfcp: Remove two FIXME comments Christof Schmitt
2010-02-17 10:18 ` [patch 04/11] zfcp: Remove unused payload field from zfcp_dbf_san_record Christof Schmitt
2010-02-17 10:18 ` [patch 05/11] zfcp: Fix warnings from smatch Christof Schmitt
2010-02-17 10:18 ` Christof Schmitt [this message]
2010-02-17 10:18 ` [patch 07/11] zfcp: Remove duplicate assignment of req_seq_no Christof Schmitt
2010-02-17 10:18 ` [patch 08/11] zfcp: Rename sysfs_device attribute to dev in zfcp_unit and zfcp_port Christof Schmitt
2010-02-17 10:18 ` [patch 09/11] zfcp: Move scsi result tracing decision to zfcp_dbf.h Christof Schmitt
2010-02-17 10:18 ` [patch 10/11] zfcp: Replace FC4 constants with information from exchange port Christof Schmitt
2010-02-17 10:18 ` [patch 11/11] zfcp: Introduce header file for qdio structs and inline functions 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=20100217102018.671750000@de.ibm.com \
--to=christof.schmitt@de.ibm.com \
--cc=James.Bottomley@suse.de \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox