From: John Garry <john.garry@huawei.com>
To: Damien Le Moal <damien.lemoal@opensource.wdc.com>,
<jejb@linux.ibm.com>, <martin.petersen@oracle.com>,
<jinpu.wang@cloud.ionos.com>, <yangxingui@huawei.com>
Cc: <linux-scsi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linuxarm@huawei.com>, <hare@suse.de>
Subject: Re: [PATCH v2 2/6] scsi: libsas: Add sas_ata_device_link_abort()
Date: Fri, 2 Sep 2022 17:19:37 +0100 [thread overview]
Message-ID: <4b471300-a912-c3c0-ead4-7165c57cbbf8@huawei.com> (raw)
In-Reply-To: <eb3465a2-335e-a605-ba8a-4cce790b5b02@huawei.com>
Hi Damien,
>>>
>>> But the pm8001 manual and current driver indicate that the
>>> OPC_INB_SATA_ABORT command should be sent after read log ext when
>>> handling NCQ error, regardless of an autopsy. I send OPC_INB_SATA_ABORT
>>> in ata_eh_reset() -> pm8001_I_T_nexus_reset() -> pm8001_send_abort_all()
>> You lost me: ata_eh_recover() will call ata_eh_reset() only if the
>> ATA_EH_RESET
>> action flag is set. So are you saying that even though it is not
>> needed, you
>> still need to set ATA_EH_RESET for pm8001 ?
>
> As below, it was the only location I found suitable to call
> pm8001_send_abort_all().
>
> However I am not really sure it is required now. For pm8001 NCQ error
> handling we require 2x steps:
> - read log ext
> - Send OPC_INB_SATA_ABORT - we do this in pm8001_send_abort_all()
>
> pm8001_send_abort_all() sends OPC_INB_SATA_ABORT in "device abort all"
> mode, meaning any IO in the HBA is aborted for the device. But we are
> also earlier in EH sending OPC_INB_SATA_ABORT for individual IOs in
> sas_eh_handle_sas_errors() -> sas_scsi_find_task() ->
> pm8001_abort_task() -> sas_execute_internal_abort_single() -> ...
> send_abort_task()
>
> So I don't think that the pm8001_send_abort_all() call has any effect,
> as we're already aborting any outstanding IO earlier.
>
> Admittedly the order of the 2x steps is different, but
> OPC_INB_SATA_ABORT does not send any protocol message to the disk, so
> would not affect anything subsequently read with read log ext.
>
> Having said all that, it may be wise to still send
> pm8001_send_abort_all()..
Have you had a chance to consider all this yet?
I am now starting to think that it is not necessary to call
pm8001_send_abort_all(), and instead rely only on
sas_eh_handle_sas_errors() -> sas_scsi_find_task() ->
pm8001_abort_task() -> sas_execute_internal_abort_single() -> ... ->
send_abort_task() to abort each outstanding IO. Then we would not have
the issue of forcing the reset in $subject (to lead to calling
pm8001_send_abort_all()).
This idea could simply be tested by stubbing pm8001_send_abort_all()
(and dropping the |= ATA_EH_RESET in $subject).
Thanks,
John
next prev parent reply other threads:[~2022-09-02 16:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-17 14:52 [PATCH v2 0/6] libsas and drivers: NCQ error handling John Garry
2022-08-17 14:52 ` [PATCH v2 1/6] scsi: pm8001: Modify task abort handling for SATA task John Garry
2022-08-17 14:52 ` [PATCH v2 2/6] scsi: libsas: Add sas_ata_device_link_abort() John Garry
2022-08-17 16:04 ` Damien Le Moal
2022-08-17 16:54 ` John Garry
2022-08-17 17:14 ` Damien Le Moal
2022-08-18 12:09 ` John Garry
2022-09-02 16:19 ` John Garry [this message]
2022-09-05 23:23 ` Damien Le Moal
2022-08-17 14:52 ` [PATCH v2 3/6] scsi: pm8001: Use sas_ata_device_link_abort() to handle NCQ errors John Garry
2022-08-17 14:52 ` [PATCH v2 4/6] scsi: hisi_sas: Don't issue ATA softreset in hisi_sas_abort_task() John Garry
2022-08-17 14:52 ` [PATCH v2 5/6] scsi: hisi_sas: Add SATA_DISK_ERR bit handling for v3 hw John Garry
2022-08-17 14:52 ` [PATCH v2 6/6] scsi: libsas: Make sas_{alloc, alloc_slow, free}_task() private John Garry
2022-08-17 15:52 ` [PATCH v2 0/6] libsas and drivers: NCQ error handling Damien Le Moal
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=4b471300-a912-c3c0-ead4-7165c57cbbf8@huawei.com \
--to=john.garry@huawei.com \
--cc=damien.lemoal@opensource.wdc.com \
--cc=hare@suse.de \
--cc=jejb@linux.ibm.com \
--cc=jinpu.wang@cloud.ionos.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=martin.petersen@oracle.com \
--cc=yangxingui@huawei.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;
as well as URLs for NNTP newsgroup(s).