From: John Garry <john.g.garry@oracle.com>
To: JiangJianJun <jiangjianjun3@huawei.com>,
James.Bottomley@HansenPartnership.com,
martin.petersen@oracle.com, linux-scsi@vger.kernel.org
Cc: bvanassche@acm.org, hewenliang4@huawei.com, yangyun50@huawei.com,
wuyifeng10@huawei.com
Subject: Re: scsi: scsi_debug: make timeout faults by set delay to maximum value
Date: Fri, 7 Nov 2025 10:05:07 +0000 [thread overview]
Message-ID: <8d4247f6-2772-4f2e-aef7-32c1b0dc8091@oracle.com> (raw)
In-Reply-To: <20251106120314.3272270-1-jiangjianjun3@huawei.com>
On 06/11/2025 12:03, JiangJianJun wrote:
>> I got this patch 3x times...
> Sorry, command has an error, i thought it had failed, so I sent it again.
>
>> What do you mean by "checked during cancellation"?
> &
>> I don't know what is meant by "cancel the command properly".
> Maybe I shouldn't use "cancel" to describe it; in the code, it's called "abort".
> The function `sdebug_timeout_cmd` is designed to simulate a command timeout, by
> discarding it. I noticed that you added a check to see if the command was
> executed before "abort"; otherwise, it returns a failure.
When we get discard the command, we get a timeout, and the scsi error
handling kicks in eventually. The first thing that the scsi error
handler tries to do is abort the command. All that the scsi_debug abort
handler can do is ensure that we no longer have a reference to the
scsi_command, which may mean cancelling any pending completion (if
possible). Is your problem that sometimes the abort handler may fail,
and we have to escalate?
> Therefore, I change discarding to long-long-delay, so that "abort" will succeed.
> If we needed abort-failure, we can inject ERR_ABORT_CMD_FAILED.
>
> The fault-injection can be seen this link:
> https://urldefense.com/v3/__https://lore.kernel.org/r/20231010092051.608007-5-haowenchao2@huawei.com__;!!ACWV5N9M2RV99hQ!L_o5Xt_9lhXLe0R8AWsJWnt33qXlNijbVEWyiq9kjgA2lBsuV7E2s7ficvGM37RlSxxvXVZ1YEkAQxZ-WkFvKGTURrU$
>
>
next prev parent reply other threads:[~2025-11-07 10:05 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-24 11:55 [PATCH 0/4] scsi_debug improvements John Garry
2025-02-24 11:55 ` [PATCH 1/4] scsi: scsi_debug: Remove sdebug_device_access_info John Garry
2025-02-24 18:04 ` Bart Van Assche
2025-02-24 11:55 ` [PATCH 2/4] scsi: scsi_debug: Remove a reference to in_use_bm John Garry
2025-02-24 11:55 ` [PATCH 3/4] scsi: scsi_debug: Simplify command handling John Garry
2025-02-24 11:55 ` [PATCH 4/4] scsi: scsi_debug: Do not sleep in atomic sections John Garry
2025-11-05 11:57 ` [PATCH] scsi: scsi_debug: make timeout faults by set delay to maximum value JiangJianJun
2025-11-05 12:00 ` JiangJianJun
2025-11-05 12:01 ` JiangJianJun
2025-11-05 11:54 ` John Garry
2025-11-06 12:03 ` JiangJianJun
2025-11-07 10:05 ` John Garry [this message]
2025-11-08 8:29 ` JiangJianJun
2025-11-08 9:38 ` John Garry
2025-11-11 10:59 ` JiangJianJun
2025-11-12 8:53 ` John Garry
2025-11-12 13:38 ` JiangJianJun
2025-11-12 16:02 ` John Garry
2025-11-13 11:22 ` JiangJianJun
2025-11-13 11:48 ` John Garry
2025-02-25 1:57 ` [PATCH 0/4] scsi_debug improvements Martin K. Petersen
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=8d4247f6-2772-4f2e-aef7-32c1b0dc8091@oracle.com \
--to=john.g.garry@oracle.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=bvanassche@acm.org \
--cc=hewenliang4@huawei.com \
--cc=jiangjianjun3@huawei.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=wuyifeng10@huawei.com \
--cc=yangyun50@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