From: Matthew Wilcox <matthew@wil.cx>
To: linux-scsi@vger.kernel.org
Subject: Re: [RFC] Fix device not ready printk
Date: Thu, 19 Jul 2007 12:51:46 -0600 [thread overview]
Message-ID: <20070719185145.GU14791@parisc-linux.org> (raw)
In-Reply-To: <20070629132126.GA18722@parisc-linux.org>
On Fri, Jun 29, 2007 at 07:21:26AM -0600, Matthew Wilcox wrote:
> I'm in two minds about printing the 'Device not ready' twice. On the
> one hand, it's redundant information. On the other hand, it helps the
> harried sysadmin with multiple simultaneous disc failures tie the two
> messages together.
>
> So I'm not signing off on this because I think it warrants further discussion.
After three weeks with no discussion, I guess it may as well be applied.
----
scsi: Better error messages when device not ready
Because scsi_print_sense_hdr prefixes with KERN_INFO, the output from
scsi_io_completion looks like:
sd 0:0:0:0: [sdb] Device not ready: <6>: Sense Key : 0x2 [current]
: ASC=0x4 ASCQ=0x3
By using scsi_show_sense_hdr, we can get the much more appealing output:
sd 0:0:0:0: [sdb] Device not ready: Sense Key : 0x2 [current]
sd 0:0:0:0: [sdb] Device not ready: ASC=0x4 ASCQ=0x3
Signed-off-by: Matthew Wilcox <matthew@wil.cx>
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 1f5a07b..d0b8608 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -940,7 +940,10 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes)
if (!(req->cmd_flags & REQ_QUIET)) {
scmd_printk(KERN_INFO, cmd,
"Device not ready: ");
- scsi_print_sense_hdr("", &sshdr);
+ scsi_show_sense_hdr(&sshdr);
+ scmd_printk(KERN_INFO, cmd,
+ "Device not ready: ");
+ scsi_show_extd_sense(sshdr.asc, sshdr.ascq);
}
scsi_end_request(cmd, 0, this_count, 1);
return;
--
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
next prev parent reply other threads:[~2007-07-19 18:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-29 13:21 [RFC] Fix device not ready printk Matthew Wilcox
2007-07-19 18:51 ` Matthew Wilcox [this message]
2007-07-19 19:05 ` Martin K. Petersen
2007-09-23 14:08 ` James Bottomley
2007-09-23 14:25 ` Matthew Wilcox
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=20070719185145.GU14791@parisc-linux.org \
--to=matthew@wil.cx \
--cc=linux-scsi@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 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.