linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: stable@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	Steffen Maier <maier@linux.vnet.ibm.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	Jiri Slaby <jslaby@suse.cz>
Subject: [PATCH 3.12 23/72] zfcp: retain trace level for SCSI and HBA FSF response records
Date: Mon,  7 Nov 2016 14:04:30 +0100	[thread overview]
Message-ID: <9a71e7e6a8028430b6a9ed8367fed937ac64720b.1478523828.git.jslaby@suse.cz> (raw)
In-Reply-To: <0f3caac741164dcff670ae0f4d1cfcb0a7026a1c.1478523828.git.jslaby@suse.cz>
In-Reply-To: <cover.1478523828.git.jslaby@suse.cz>

From: Steffen Maier <maier@linux.vnet.ibm.com>

3.12-stable review patch.  If anyone has any objections, please let me know.

===============

commit 35f040df97fa0e94c7851c054ec71533c88b4b81 upstream.

While retaining the actual filtering according to trace level,
the following commits started to write such filtered records
with a hardcoded record level of 1 instead of the actual record level:
commit 250a1352b95e1db3216e5c5d4f4365bea5122f4a
("[SCSI] zfcp: Redesign of the debug tracing for SCSI records.")
commit a54ca0f62f953898b05549391ac2a8a4dad6482b
("[SCSI] zfcp: Redesign of the debug tracing for HBA records.")

Now we can distinguish written records again for offline level filtering.

Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Fixes: 250a1352b95e ("[SCSI] zfcp: Redesign of the debug tracing for SCSI records.")
Fixes: a54ca0f62f95 ("[SCSI] zfcp: Redesign of the debug tracing for HBA records.")
Reviewed-by: Benjamin Block <bblock@linux.vnet.ibm.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/s390/scsi/zfcp_dbf.c | 11 ++++++-----
 drivers/s390/scsi/zfcp_dbf.h |  4 ++--
 drivers/s390/scsi/zfcp_ext.h |  7 ++++---
 3 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c
index 132a905b6bdb..bbd1ed552d7d 100644
--- a/drivers/s390/scsi/zfcp_dbf.c
+++ b/drivers/s390/scsi/zfcp_dbf.c
@@ -3,7 +3,7 @@
  *
  * Debug traces for zfcp.
  *
- * Copyright IBM Corp. 2002, 2013
+ * Copyright IBM Corp. 2002, 2015
  */
 
 #define KMSG_COMPONENT "zfcp"
@@ -65,7 +65,7 @@ void zfcp_dbf_pl_write(struct zfcp_dbf *dbf, void *data, u16 length, char *area,
  * @tag: tag indicating which kind of unsolicited status has been received
  * @req: request for which a response was received
  */
-void zfcp_dbf_hba_fsf_res(char *tag, struct zfcp_fsf_req *req)
+void zfcp_dbf_hba_fsf_res(char *tag, int level, struct zfcp_fsf_req *req)
 {
 	struct zfcp_dbf *dbf = req->adapter->dbf;
 	struct fsf_qtcb_prefix *q_pref = &req->qtcb->prefix;
@@ -97,7 +97,7 @@ void zfcp_dbf_hba_fsf_res(char *tag, struct zfcp_fsf_req *req)
 				  rec->pl_len, "fsf_res", req->req_id);
 	}
 
-	debug_event(dbf->hba, 1, rec, sizeof(*rec));
+	debug_event(dbf->hba, level, rec, sizeof(*rec));
 	spin_unlock_irqrestore(&dbf->hba_lock, flags);
 }
 
@@ -399,7 +399,8 @@ void zfcp_dbf_san_in_els(char *tag, struct zfcp_fsf_req *fsf)
  * @sc: pointer to struct scsi_cmnd
  * @fsf: pointer to struct zfcp_fsf_req
  */
-void zfcp_dbf_scsi(char *tag, struct scsi_cmnd *sc, struct zfcp_fsf_req *fsf)
+void zfcp_dbf_scsi(char *tag, int level, struct scsi_cmnd *sc,
+		   struct zfcp_fsf_req *fsf)
 {
 	struct zfcp_adapter *adapter =
 		(struct zfcp_adapter *) sc->device->host->hostdata[0];
@@ -441,7 +442,7 @@ void zfcp_dbf_scsi(char *tag, struct scsi_cmnd *sc, struct zfcp_fsf_req *fsf)
 		}
 	}
 
-	debug_event(dbf->scsi, 1, rec, sizeof(*rec));
+	debug_event(dbf->scsi, level, rec, sizeof(*rec));
 	spin_unlock_irqrestore(&dbf->scsi_lock, flags);
 }
 
diff --git a/drivers/s390/scsi/zfcp_dbf.h b/drivers/s390/scsi/zfcp_dbf.h
index b5afa3d01e93..97f46e6964d4 100644
--- a/drivers/s390/scsi/zfcp_dbf.h
+++ b/drivers/s390/scsi/zfcp_dbf.h
@@ -284,7 +284,7 @@ static inline
 void zfcp_dbf_hba_fsf_resp(char *tag, int level, struct zfcp_fsf_req *req)
 {
 	if (level <= req->adapter->dbf->hba->level)
-		zfcp_dbf_hba_fsf_res(tag, req);
+		zfcp_dbf_hba_fsf_res(tag, level, req);
 }
 
 /**
@@ -323,7 +323,7 @@ void _zfcp_dbf_scsi(char *tag, int level, struct scsi_cmnd *scmd,
 					scmd->device->host->hostdata[0];
 
 	if (level <= adapter->dbf->scsi->level)
-		zfcp_dbf_scsi(tag, scmd, req);
+		zfcp_dbf_scsi(tag, level, scmd, req);
 }
 
 /**
diff --git a/drivers/s390/scsi/zfcp_ext.h b/drivers/s390/scsi/zfcp_ext.h
index a9c570a09b85..673f85103d72 100644
--- a/drivers/s390/scsi/zfcp_ext.h
+++ b/drivers/s390/scsi/zfcp_ext.h
@@ -3,7 +3,7 @@
  *
  * External function declarations.
  *
- * Copyright IBM Corp. 2002, 2010
+ * Copyright IBM Corp. 2002, 2015
  */
 
 #ifndef ZFCP_EXT_H
@@ -36,7 +36,7 @@ extern void zfcp_dbf_rec_trig(char *, struct zfcp_adapter *,
 			      struct zfcp_port *, struct scsi_device *, u8, u8);
 extern void zfcp_dbf_rec_run(char *, struct zfcp_erp_action *);
 extern void zfcp_dbf_hba_fsf_uss(char *, struct zfcp_fsf_req *);
-extern void zfcp_dbf_hba_fsf_res(char *, struct zfcp_fsf_req *);
+extern void zfcp_dbf_hba_fsf_res(char *, int, struct zfcp_fsf_req *);
 extern void zfcp_dbf_hba_bit_err(char *, struct zfcp_fsf_req *);
 extern void zfcp_dbf_hba_berr(struct zfcp_dbf *, struct zfcp_fsf_req *);
 extern void zfcp_dbf_hba_def_err(struct zfcp_adapter *, u64, u16, void **);
@@ -44,7 +44,8 @@ extern void zfcp_dbf_hba_basic(char *, struct zfcp_adapter *);
 extern void zfcp_dbf_san_req(char *, struct zfcp_fsf_req *, u32);
 extern void zfcp_dbf_san_res(char *, struct zfcp_fsf_req *);
 extern void zfcp_dbf_san_in_els(char *, struct zfcp_fsf_req *);
-extern void zfcp_dbf_scsi(char *, struct scsi_cmnd *, struct zfcp_fsf_req *);
+extern void zfcp_dbf_scsi(char *, int, struct scsi_cmnd *,
+			  struct zfcp_fsf_req *);
 
 /* zfcp_erp.c */
 extern void zfcp_erp_set_adapter_status(struct zfcp_adapter *, u32);
-- 
2.10.2

  parent reply	other threads:[~2016-11-07 13:19 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20161107130417epcas3p4869f405f9f73d6336d5dbfd0e118b62b@epcas3p4.samsung.com>
2016-11-07 13:04 ` [PATCH 3.12 00/72] 3.12.67-stable review Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 01/72] i40e: avoid NULL pointer dereference and recursive errors on early PCI error Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 02/72] reiserfs: Unlock superblock before calling reiserfs_quota_on_mount() Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 03/72] scsi: ibmvfc: Fix I/O hang when port is not mapped Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 04/72] ext4: reinforce check of i_dtime when clearing high fields of uid and gid Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 05/72] ext4: allow DAX writeback for hole punch Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 06/72] cfq: fix starvation of asynchronous writes Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 07/72] pstore: Fix buffer overflow while write offset equal to buffer size Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 08/72] ipc: remove use of seq_printf return value Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 09/72] gpio: mpc8xxx: Correct irq handler function Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 10/72] regulator: tps65910: Work around silicon erratum SWCZ010 Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 11/72] mmc: block: don't use CMD23 with very old MMC cards Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 12/72] pstore/core: drop cmpxchg based updates Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 13/72] pstore/ram: Use memcpy_toio instead of memcpy Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 14/72] pstore/ram: Use memcpy_fromio() to save old buffer Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 15/72] dm: mark request_queue dead before destroying the DM device Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 16/72] powerpc/vdso64: Use double word compare on pointers Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 17/72] powerpc/powernv: Use CPU-endian PEST in pnv_pci_dump_p7ioc_diag_data() Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 18/72] powerpc/64: Fix incorrect return value from __copy_tofrom_user Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 19/72] powerpc/pseries: Fix stack corruption in htpe code Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 20/72] zfcp: fix fc_host port_type with NPIV Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 21/72] zfcp: fix ELS/GS request&response length for hardware data router Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 22/72] zfcp: close window with unblocked rport during rport gone Jiri Slaby
2016-11-07 13:04   ` Jiri Slaby [this message]
2016-11-07 13:04   ` [PATCH 3.12 24/72] zfcp: restore: Dont use 0 to indicate invalid LUN in rec trace Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 25/72] zfcp: trace on request for open and close of WKA port Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 26/72] zfcp: restore tracing of handle for port and LUN with HBA records Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 27/72] zfcp: fix D_ID field with actual value on tracing SAN responses Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 28/72] zfcp: fix payload trace length for SAN request&response Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 29/72] zfcp: trace full payload of all SAN records (req,resp,iels) Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 30/72] scsi: zfcp: spin_lock_irqsave() is not nestable Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 31/72] fbdev/efifb: Fix 16 color palette entry calculation Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 32/72] mb86a20s: fix the locking logic Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 33/72] mb86a20s: fix demod settings Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 34/72] cx231xx: don't return error on success Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 35/72] cx231xx: fix GPIOs for Pixelview SBTVD hybrid Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 36/72] MIPS: ptrace: Fix regs_return_value for kernel context Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 37/72] Input: elantech - force needed quirks on Fujitsu H760 Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 38/72] Input: elantech - add Fujitsu Lifebook E556 to force crc_enabled Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 39/72] NFSv4: Open state recovery must account for file permission changes Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 40/72] scsi: Fix use-after-free Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 41/72] metag: Only define atomic_dec_if_positive conditionally Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 42/72] compiler: Allow 1- and 2-byte smp_load_acquire() and smp_store_release() Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 43/72] ipc/sem.c: fix complex_count vs. simple op race Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 44/72] arc: don't leak bits of kernel stack into coredump Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 45/72] fs/super.c: fix race between freeze_super() and thaw_super() Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 46/72] cifs: Limit the overall credit acquired Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 47/72] Clarify locking of cifs file and tcon structures and make more granular Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 48/72] Display number of credits available Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 49/72] Set previous session id correctly on SMB3 reconnect Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 50/72] SMB3: GUIDs should be constructed as random but valid uuids Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 51/72] Do not send SMB3 SET_INFO request if nothing is changing Jiri Slaby
2016-11-07 13:04   ` [PATCH 3.12 52/72] net/mlx4_core: Allow resetting VF admin mac to zero Jiri Slaby
2016-11-07 13:05   ` [PATCH 3.12 53/72] isofs: Do not return EACCES for unknown filesystems Jiri Slaby
2016-11-07 13:05   ` [PATCH 3.12 54/72] mmc: core: Annotate cmd_hdr as __le32 Jiri Slaby
2016-11-07 13:05   ` [PATCH 3.12 55/72] ubifs: Fix xattr_names length in exit paths Jiri Slaby
2016-11-07 13:05   ` [PATCH 3.12 56/72] drm/radeon: narrow asic_init for virtualization Jiri Slaby
2016-11-07 13:05   ` [PATCH 3.12 57/72] drm/radeon/si/dpm: fix phase shedding setup Jiri Slaby
2016-11-07 13:05   ` [PATCH 3.12 58/72] drm/radeon: change vblank_time's calculation method to reduce computational error Jiri Slaby
2016-11-07 13:05   ` [PATCH 3.12 59/72] mm/hugetlb: fix memory offline with hugepage size > memory block size Jiri Slaby
2016-11-07 13:05   ` [PATCH 3.12 60/72] introduce NETIF_F_GSO_ENCAP_ALL helper mask Jiri Slaby
2016-11-07 13:05   ` [PATCH 3.12 61/72] tunnels: Remove encapsulation offloads on decap Jiri Slaby
2016-11-07 13:30   ` [PATCH 3.12 62/72] powerpc/eeh: Null check uses of eeh_pe_bus_get Jiri Slaby
2016-11-07 13:30   ` [PATCH 3.12 63/72] genirq/generic_chip: Add irq_unmap callback Jiri Slaby
2016-11-07 13:30   ` [PATCH 3.12 64/72] uio: fix dmem_region_start computation Jiri Slaby
2016-11-07 13:30   ` [PATCH 3.12 65/72] crypto: gcm - Fix IV buffer size in crypto_gcm_setkey Jiri Slaby
2016-11-07 13:30   ` [PATCH 3.12 66/72] hwrng: omap - Only fail if pm_runtime_get_sync returns < 0 Jiri Slaby
2016-11-07 13:30   ` [PATCH 3.12 67/72] perf symbols: Fixup symbol sizes before picking best ones Jiri Slaby
2016-11-07 13:30   ` [PATCH 3.12 68/72] powerpc/nvram: Fix an incorrect partition merge Jiri Slaby
2016-11-07 13:30   ` [PATCH 3.12 69/72] Revert "fix minor infoleak in get_user_ex()" Jiri Slaby
2016-11-07 16:45     ` Linus Torvalds
2016-11-08 10:36       ` Greg KH
2016-11-07 13:30   ` [PATCH 3.12 70/72] i2c: core: fix NULL pointer dereference under race condition Jiri Slaby
2016-11-07 13:30   ` [PATCH 3.12 71/72] scsi: arcmsr: Buffer overflow in arcmsr_iop_message_xfer() Jiri Slaby
2016-11-07 13:30   ` [PATCH 3.12 72/72] usb: hub: change CLEAR_FEATURE to SET_FEATURE Jiri Slaby
2016-11-07 17:16   ` [PATCH 3.12 00/72] 3.12.67-stable review Guenter Roeck
2016-11-08 15:40     ` Jiri Slaby
2016-11-09  4:14       ` Guenter Roeck
2016-11-10 18:50         ` Jiri Slaby
2016-11-07 18:34   ` Shuah Khan
2016-11-10 18:51     ` Jiri Slaby

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=9a71e7e6a8028430b6a9ed8367fed937ac64720b.1478523828.git.jslaby@suse.cz \
    --to=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maier@linux.vnet.ibm.com \
    --cc=martin.petersen@oracle.com \
    --cc=stable@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).