From: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
To: jejb@linux.vnet.ibm.com, martin.petersen@oracle.com
Cc: hare@suse.de, bart.vanassche@sandisk.com,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 4/4] scsi: scsi_dh_alua: add sdev_dbg() to track alua_rtpg_work()
Date: Mon, 10 Jul 2017 19:47:37 -0300 [thread overview]
Message-ID: <1499726857-7875-5-git-send-email-mauricfo@linux.vnet.ibm.com> (raw)
In-Reply-To: <1499726857-7875-1-git-send-email-mauricfo@linux.vnet.ibm.com>
Insert sdev_dbg() calls in the function path which may queue
alua_rtpg_work() past initialization, for debugging purposes:
- alua_activate()
- alua_check_sense()
- alua_rtpg_queue()
Signed-off-by: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
---
drivers/scsi/device_handler/scsi_dh_alua.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
index e0bf0827a980..5bf0d55f6eb1 100644
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
@@ -422,6 +422,10 @@ static char print_alua_state(unsigned char state)
static int alua_check_sense(struct scsi_device *sdev,
struct scsi_sense_hdr *sense_hdr)
{
+ sdev_dbg(sdev, "%s: %s(): Sense Key: 0x%x, ASC: 0x%x, ASCQ: 0x%x\n",
+ ALUA_DH_NAME, __func__, sense_hdr->sense_key,
+ sense_hdr->asc, sense_hdr->ascq);
+
switch (sense_hdr->sense_key) {
case NOT_READY:
if (sense_hdr->asc == 0x04 && sense_hdr->ascq == 0x0a) {
@@ -987,10 +991,13 @@ static bool alua_rtpg_queue(struct alua_port_group *pg,
spin_unlock_irqrestore(&pg->lock, flags);
if (start_queue) {
+
if (queue_delayed_work(alua_wq, &pg->rtpg_work,
- msecs_to_jiffies(ALUA_RTPG_DELAY_MSECS)))
+ msecs_to_jiffies(ALUA_RTPG_DELAY_MSECS))) {
+ sdev_dbg(sdev, "%s: %s(): port group %02x\n",
+ ALUA_DH_NAME, __func__, pg->group_id);
sdev = NULL;
- else
+ } else
kref_put(&pg->kref, release_port_group);
}
if (sdev)
@@ -1100,6 +1107,9 @@ static int alua_activate(struct scsi_device *sdev,
rcu_read_unlock();
mutex_unlock(&h->init_mutex);
+ sdev_dbg(sdev, "%s: %s(): port group %02x, fn: %pf()\n",
+ ALUA_DH_NAME, __func__, pg->group_id, fn);
+
if (alua_rtpg_queue(pg, sdev, qdata, true))
fn = NULL;
else
--
1.8.3.1
next prev parent reply other threads:[~2017-07-10 22:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-10 22:47 [PATCH v2 0/4] scsi_dh_alua: fix stuck I/O after unavailable/standby states Mauricio Faria de Oliveira
2017-07-10 22:47 ` [PATCH v2 1/4] scsi: scsi_dh_alua: allow I/O in target port unavailable and standby states Mauricio Faria de Oliveira
2017-07-11 9:18 ` Hannes Reinecke
2017-07-11 15:32 ` Mauricio Faria de Oliveira
2017-07-11 21:01 ` Mauricio Faria de Oliveira
2017-07-10 22:47 ` [PATCH v2 2/4] scsi: scsi_dh_alua: print changes to RTPG state of all PGs Mauricio Faria de Oliveira
2017-07-10 22:47 ` [PATCH v2 3/4] scsi: scsi_dh_alua: do not print RTPG state if it remains unavailable/standby Mauricio Faria de Oliveira
2017-07-11 14:11 ` [PATCH] scsi: scsi_dh_alua: fix boolreturn.cocci warnings kbuild test robot
2017-07-11 14:11 ` [PATCH v2 3/4] scsi: scsi_dh_alua: do not print RTPG state if it remains unavailable/standby kbuild test robot
2017-07-10 22:47 ` Mauricio Faria de Oliveira [this message]
2017-07-10 22:53 ` [PATCH v2 0/4] scsi_dh_alua: fix stuck I/O after unavailable/standby states Mauricio Faria de Oliveira
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=1499726857-7875-5-git-send-email-mauricfo@linux.vnet.ibm.com \
--to=mauricfo@linux.vnet.ibm.com \
--cc=bart.vanassche@sandisk.com \
--cc=hare@suse.de \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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
all inboxes | Powered by JetHome®