From: Niklas Cassel <cassel@kernel.org>
To: Damien Le Moal <dlemoal@kernel.org>
Cc: sashiko-reviews@lists.linux.dev, linux-ide@vger.kernel.org,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH v2 1/2] ata: libata-scsi: terminate deferred commands on time out
Date: Fri, 10 Jul 2026 10:06:31 +0200 [thread overview]
Message-ID: <alCoB5FOGJTljbjU@fedora> (raw)
In-Reply-To: <724b4a01-e396-4cc0-be2a-9860f42d803f@kernel.org>
On Fri, Jul 10, 2026 at 04:25:38PM +0900, Damien Le Moal wrote:
> > [Severity: High]
> > Does this function need to set ATA_PFLAG_EH_PENDING?
> >
> > Because this flag is not set, ata_port_eh_scheduled() will evaluate to
> > false. This allows the block layer to immediately retry the requeued
> > commands, which __ata_scsi_queuecmd() will accept and re-defer, keeping
> > the host busy.
>
> No it will not because this is called with SCSI EH already waiting to run, so
> newly incoming commands are not passed down by the scsi layer.
Could you please point to specific functions + lines in the code?
AFAICT, I don't see how SCSI EH is waiting to run when
scsi_eh_scmd_add() has not yet been called.
Note that all the places that currently call ata_scsi_requeue_deferred_qc()
are called when ATA_PFLAG_EH_PENDING | ATA_PFLAG_EH_IN_PROGRESS
(ata_port_eh_scheduled() evaluates to true).
We could add an WARN_ON(!ata_port_eh_scheduled) in ata_scsi_requeue_deferred_qc()
and we would never see the warning.
With the new function ata_scsi_port_eh_timed_out(), AFAICT, it can call
ata_scsi_requeue_deferred_qc() before ata_port_eh_scheduled() evaluates to true.
See e.g. the commit message for:
e20e81a24a4d ("ata: libata-core: do not issue non-internal commands once EH is pending")
of why I think __ata_scsi_queuecmd() will accept new commands.
Kind regards,
Niklas
next prev parent reply other threads:[~2026-07-10 8:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-10 0:06 [PATCH v2 0/2] fixup handling of timeouts with deferred QCs Damien Le Moal
2026-07-10 0:06 ` [PATCH v2 1/2] ata: libata-scsi: terminate deferred commands on time out Damien Le Moal
2026-07-10 0:24 ` sashiko-bot
2026-07-10 7:25 ` Damien Le Moal
2026-07-10 8:06 ` Niklas Cassel [this message]
2026-07-10 8:29 ` Damien Le Moal
2026-07-10 8:48 ` Niklas Cassel
2026-07-10 8:39 ` Niklas Cassel
2026-07-10 7:32 ` Niklas Cassel
2026-07-10 0:06 ` [PATCH v2 2/2] scsi: libsas: " Damien Le Moal
2026-07-10 1:53 ` Jason Yan
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=alCoB5FOGJTljbjU@fedora \
--to=cassel@kernel.org \
--cc=dlemoal@kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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.