From: Damien Le Moal <dlemoal@kernel.org>
To: Mike Christie <michael.christie@oracle.com>,
Bart Van Assche <bvanassche@acm.org>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
Hannes Reinecke <hare@suse.de>
Cc: "James E . J . Bottomley" <James.Bottomley@HansenPartnership.com>,
Jaegeuk Kim <jaegeuk@kernel.org>, Christoph Hellwig <hch@lst.de>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: Re: RFC: Retrying SCSI pass-through commands
Date: Mon, 5 Aug 2024 10:47:55 -0700 [thread overview]
Message-ID: <f931edd1-ca89-461f-b242-b5d33fe6ca37@kernel.org> (raw)
In-Reply-To: <2addecad-bad3-41e2-a8c7-ee68f3c471bf@oracle.com>
On 2024/08/03 13:42, Mike Christie wrote:
> On 7/31/24 3:22 PM, Bart Van Assche wrote:
>>
>>
>> diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
>> index da7dac77f8cd..e21becc5bcf9 100644
>> --- a/drivers/scsi/scsi_error.c
>> +++ b/drivers/scsi/scsi_error.c
>> @@ -1816,6 +1816,12 @@ bool scsi_noretry_cmd(struct scsi_cmnd *scmd)
>> * assume caller has checked sense and determined
>> * the check condition was retryable.
>> */
>> - if (req->cmd_flags & REQ_FAILFAST_DEV || blk_rq_is_passthrough(req))
>> - return true;
>> + if (req->cmd_flags & REQ_FAILFAST_DEV)
>> + return true;
>> + if (/* submitted by the SCSI core */)
>> + return false;
>> + if (blk_rq_is_passthrough(req))
>> + return true;
>
> Do you just want to retry UAs or all internal passthrough command
> errors that go through here?
I think that we definitely do *not* want to retry all internal commands. E.g. I
do not see the point in retrying INQUIRY or VPD page accesses failing on device
scan.
>
> For just the specific UA or NOT_READY/0x04/0x01 case for an example.
> Does every scsi core passthrough caller want that retried? If so, then
> I can see where you are coming from where you feel it's a bug. I would
> agree we would normally want to retry that in general. Maybe others know
> about some specific old case though.
I think the command Bart had a problem with is START_STOP_UNIT. If that is the
only case causing problems, then we should probably improve
sd_start_stop_device() to allow retries. But if there are more commands that
needs the same, then the patch that Bart is proposing makes sense I think, but
it will require an audit of all REQ_OP_DRV_XXX internal users to make sure that
they all use that command with -> allowed set to 0. But hopefully, most cases go
through scsi_execute_cmnd(), which should simplify this audit.
>
> However, I'm not sure for MEDIUM_ERROR or ABORTED_COMMAND.
> I think MEDIUM_ERROR probably would not come up for the cases we are
> talking about though.
>
> I don't think we want to always retry DID_TIME_OUT though. The funny
> thing is that I think Martin just wanted to retry one specific case
> for that error. We had to do the scsi_check_passthrough patches so
> we could retry just for scsi_probe_lun.
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2024-08-05 17:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-31 20:22 RFC: Retrying SCSI pass-through commands Bart Van Assche
2024-08-01 3:33 ` Damien Le Moal
2024-08-01 20:12 ` Bart Van Assche
2024-08-02 0:47 ` Damien Le Moal
2024-08-02 16:52 ` Bart Van Assche
2024-08-01 7:04 ` Damien Le Moal
2024-08-01 18:00 ` Bart Van Assche
2024-08-03 20:42 ` Mike Christie
2024-08-05 17:47 ` Damien Le Moal [this message]
2024-08-05 17:56 ` Bart Van Assche
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=f931edd1-ca89-461f-b242-b5d33fe6ca37@kernel.org \
--to=dlemoal@kernel.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=bvanassche@acm.org \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=jaegeuk@kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=michael.christie@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