linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH] Remove 'unhandled error code' messages
Date: Thu, 10 Nov 2011 16:18:57 +0100	[thread overview]
Message-ID: <4EBBEB61.1090903@suse.de> (raw)
In-Reply-To: <1320936918.3040.1.camel@dabdike.int.hansenpartnership.com>

On 11/10/2011 03:55 PM, James Bottomley wrote:
> On Thu, 2011-11-10 at 15:12 +0100, Hannes Reinecke wrote:
>> scsi_io_completion() tries to take some action based on
>> the command result and sense code. It also displays
>> 'unhandled error code' or 'unhandled sense code' in case
>> no special handling was found.
>> This serves as an additional source of confusion to
>> the unsuspecting user, as the message in fact means
>> 'everything okay, no special casing required',
>> and not 'oh gosh, something has happened and the system
>> couldn't deal with it'.
>
> It means we're just about to fail the command with an error.  That's not
> really an everything ok case.
>
> Sometimes, you're right, this is the correct thing to do silently, but
> often it's not.  So, same question to you as to Rob: What are the
> circumstances you want silent failure for and can you special case them?
>
The whole point here is: It's not silent, even when the 
'description' is not set.

	switch (action) {
	case ACTION_FAIL:
		/* Give up and fail the remainder of the request */
		scsi_release_buffers(cmd);
		if (!(req->cmd_flags & REQ_QUIET)) {
			if (description)
				scmd_printk(KERN_INFO, cmd, "%s\n",
					    description);
			scsi_print_result(cmd);
			if (driver_byte(result) & DRIVER_SENSE)
				scsi_print_sense("", cmd);
			scsi_print_command(cmd);
		}
		if (blk_end_request_err(req, error))
			scsi_requeue_command(q, cmd);
		else
			scsi_next_command(cmd);
		break;

So the decoded result and sense code is printed always, regardless 
of the 'description'.
The 'description' just tells us if there are special
circumstances. And as we didn't do anything special
we should print anything here.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2011-11-10 15:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-10 14:12 [PATCH] Remove 'unhandled error code' messages Hannes Reinecke
2011-11-10 14:55 ` James Bottomley
2011-11-10 15:18   ` Hannes Reinecke [this message]
2011-11-10 15:44     ` James Bottomley
2011-11-10 17:27       ` Rob Evers

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=4EBBEB61.1090903@suse.de \
    --to=hare@suse.de \
    --cc=James.Bottomley@HansenPartnership.com \
    --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 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).