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: Wed, 26 Oct 2016 08:52:40 -0700 [thread overview]
Message-ID: <1477497160.2724.11.camel@linux.vnet.ibm.com> (raw)
In-Reply-To: <e3531f72-596e-359c-93bd-3855291d7ba0@sandisk.com>
On Wed, 2016-10-26 at 08:42 -0700, Bart Van Assche wrote:
> On 10/25/2016 04:50 PM, James Bottomley wrote:
> > On Tue, 2016-10-25 at 23:18 +0000, Bart Van Assche wrote:
> > > 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.
>
> Can you elaborate on this? Since the sense buffer is available in
> scsi_io_completion() and since that function already calls
> scsi_command_normalize_sense() this function seems like a good
> candidate to me to add retry logic for REQ_TYPE_BLOCK_PC requests.
UAs are used to signal AENs to userspace control processes that use
BLOCK_PC, like CD changers, burners and scanners. If we eat UAs inside
scsi_io_completion(), we could potentially break any userspace control
system that relies on AENs.
James
next prev parent reply other threads:[~2016-10-26 15:52 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
2016-10-26 15:42 ` Bart Van Assche
2016-10-26 15:52 ` James Bottomley [this message]
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=1477497160.2724.11.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox