From: Kenta Akagi <k@mgml.me>
To: Yu Kuai <yukuai1@huaweicloud.com>,
Li Nan <linan666@huaweicloud.com>, Song Liu <song@kernel.org>,
Mariusz Tkaczyk <mtkaczyk@kernel.org>,
Guoqing Jiang <jgq516@gmail.com>
Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org,
"yukuai (C)" <yukuai3@huawei.com>, Kenta Akagi <k@mgml.me>
Subject: Re: [PATCH v3 1/3] md/raid1,raid10: Do not set MD_BROKEN on failfast io failure
Date: Wed, 10 Sep 2025 02:07:36 +0900 [thread overview]
Message-ID: <2a949451-23d0-44ef-94fb-46b40c98957b@mgml.me> (raw)
In-Reply-To: <62365ca9-3cdb-c213-b0d4-5480ad734dd6@huaweicloud.com>
On 2025/09/09 10:02, Yu Kuai wrote:
> Hi,
>
> 在 2025/09/09 1:29, Kenta Akagi 写道:
>> On 2025/09/08 10:20, Yu Kuai wrote:
>>>
>>>
>>> 在 2025/09/02 0:48, Kenta Akagi 写道:
>>>> In the current raid1_end_write_request implementation,
>>>> - md_error is called only in the Failfast case.
>>>> - Afterwards, if the rdev is not Faulty (that is, not Failfast,
>>>> or Failfast but the last rdev — which originally was not expected
>>>> MD_BROKEN in RAID1), R1BIO_WriteError is set.
>>>> In the suggested implementation, it seems that a non-Failfast write
>>>> failure will immediately mark the rdev as Faulty, without retries.
>>>
>>> I still prefer a common helper to unify the code, not sure if I still
>>> missing something ...
>>>
>>> In general, if bio failed, for read/write/metadata/resync should be the
>>> same:
>>>
>>> 1) failfast is set, and not last rdev, md_error();
>>> 2) otherwise, we should always retry;
>>>
>>> And I do believe it's the best to unify this by a common helper.
>>
>> Yes, I realized that my idea is bad. Your idea is best,
>> especially considering the error handling in super_written.
>> I'll implement a common helper.
>>
>> By the way, I think md_error should only be serialized on RAID1 and 10
>> for now. Serializing unnecessary personalities is inefficient and can
>> lead to unfavorable results. What do you think?
>
> Just make code cleaner and I don't have preference here, md_error is
> super cold path I think.
Thank you for your advice.
Understood.
Thanks,
Akagi
> Thanks,
> Kuai
>
>>
>> Thanks,
>> Akagi
>>
>>> Thanks,
>>> Kuai
>>>
>>>
>>
>> .
>>
>
>
next prev parent reply other threads:[~2025-09-09 17:07 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-28 16:32 [PATCH v3 0/3] " Kenta Akagi
2025-08-28 16:32 ` [PATCH v3 1/3] md/raid1,raid10: " Kenta Akagi
2025-08-29 2:54 ` Li Nan
2025-08-29 12:21 ` Kenta Akagi
2025-08-30 8:48 ` Li Nan
2025-08-30 18:10 ` Kenta Akagi
2025-09-01 3:22 ` Li Nan
2025-09-01 4:22 ` Kenta Akagi
2025-09-01 7:48 ` Yu Kuai
2025-09-01 16:48 ` Kenta Akagi
2025-09-05 15:07 ` Kenta Akagi
2025-09-08 1:27 ` Yu Kuai
2025-09-08 1:20 ` Yu Kuai
2025-09-08 17:29 ` Kenta Akagi
2025-09-09 1:02 ` Yu Kuai
2025-09-09 17:07 ` Kenta Akagi [this message]
2025-11-19 3:22 ` Xiao Ni
2025-08-28 16:32 ` [PATCH v3 2/3] md/raid1,raid10: Add error message when setting MD_BROKEN Kenta Akagi
2025-08-28 16:32 ` [PATCH v3 3/3] md/raid1,raid10: Fix: Operation continuing on 0 devices Kenta Akagi
[not found] <CALTww29S+fk2WcR6_Rm1h7X3ktCsi=exp5ZuwKnFGgEBYOAXLA@mail.gmail.com>
2025-12-15 16:08 ` [PATCH v3 1/3] md/raid1,raid10: Do not set MD_BROKEN on failfast io failure Kenta Akagi
2025-12-16 12:29 ` Xiao Ni
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=2a949451-23d0-44ef-94fb-46b40c98957b@mgml.me \
--to=k@mgml.me \
--cc=jgq516@gmail.com \
--cc=linan666@huaweicloud.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=mtkaczyk@kernel.org \
--cc=song@kernel.org \
--cc=yukuai1@huaweicloud.com \
--cc=yukuai3@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
all inboxes | Powered by JetHome®