From: James Bottomley <jejb@linux.vnet.ibm.com>
To: Bart Van Assche <Bart.VanAssche@sandisk.com>,
"krisman@linux.vnet.ibm.com" <krisman@linux.vnet.ibm.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"brking@linux.vnet.ibm.com" <brking@linux.vnet.ibm.com>,
"gabriel@krisman.be" <gabriel@krisman.be>
Subject: Re: [PATCH v3 1/2] scsi: Handle Unit Attention when issuing SCSI command
Date: Tue, 25 Oct 2016 16:50:13 -0700 [thread overview]
Message-ID: <1477439413.3079.101.camel@linux.vnet.ibm.com> (raw)
In-Reply-To: <1477437481.2385.7.camel@sandisk.com>
On Tue, 2016-10-25 at 23:18 +0000, Bart Van Assche wrote:
> On Tue, 2016-10-25 at 15:23 -0700, James Bottomley wrote:
> > Because scsi_execute uses REQ_BLOCK_PC which is completed before
> > you get to that code.
>
> Hello James,
>
> Do you perhaps mean that scsi_io_completion() returns early for
> REQ_TYPE_BLOCK_PC requests? Can you clarify this further?
I'm not sure how much simpler I can make it. How about: the first if
block gives a non zero value in error causing scsi_end_request to
signal an immediate return?
> Anyway, currently the following functions interpret the SCSI sense
> buffer:
> * scsi_io_completion() in scsi_lib.c.
> * scsi_mode_sense() in scsi_lib.c.
> * scsi_test_unit_ready_flags() in scsi_lib.c.
> * scsi_probe_lun() in scsi_scan.c.
> * scsi_report_lun_scan() in scsi_scan.c.
> * ioctl_internal_command() in scsi_ioctl.c.
> * sg_rq_end_io() in sg.c.
> * scsi_check_sense() in scsi_error.c.
> * spi_execute() in scsi_transport_spi.c.
>
> Are you sure we should add sense code interpretation code in a tenth
> function in the SCSI core?
In the absence of a better proposal, yes. I originally looked into
better BLOCK_PC error handling in scsi_io_completion, but that has some
knock on problems, so it seems best to leave it alone.
James
next prev parent reply other threads:[~2016-10-25 23:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-24 3:20 [PATCH v3 1/2] scsi: Handle Unit Attention when issuing SCSI command Gabriel Krisman Bertazi
2016-10-24 3:20 ` [PATCH v3 2/2] scsi: sr: Drop custom handling of unit attention Gabriel Krisman Bertazi
2016-10-25 13:00 ` [PATCH v3 1/2] scsi: Handle Unit Attention when issuing SCSI command Benjamin Block
2016-10-25 22:16 ` Bart Van Assche
2016-10-25 22:23 ` James Bottomley
2016-10-25 23:18 ` Bart Van Assche
2016-10-25 23:50 ` James Bottomley [this message]
2016-10-26 15:42 ` Bart Van Assche
2016-10-26 15:52 ` James Bottomley
2016-10-26 16:15 ` Bart Van Assche
2016-10-26 17:38 ` Brian King
2016-10-27 9:00 ` Hannes Reinecke
2016-10-28 7:32 ` Christoph Hellwig
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=1477439413.3079.101.camel@linux.vnet.ibm.com \
--to=jejb@linux.vnet.ibm.com \
--cc=Bart.VanAssche@sandisk.com \
--cc=brking@linux.vnet.ibm.com \
--cc=gabriel@krisman.be \
--cc=krisman@linux.vnet.ibm.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 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.