public inbox for linux-raid@vger.kernel.org
 help / color / mirror / Atom feed
From: "Yu Kuai" <yukuai@fnnas.com>
To: "Li Nan" <linan666@huaweicloud.com>,
	 "Benjamin Marzinski" <bmarzins@redhat.com>,
	 "Yu Kuai"
	<yukuai@alb-78bjiv52429oh8qptp.cn-shenzhen.alb.aliyuncs.com>,
	 "Song Liu" <song@kernel.org>, <yukuai@fnnas.com>
Cc: <linux-raid@vger.kernel.org>, <dm-devel@lists.linux.dev>,
	 "Xiao Ni" <xni@redhat.com>, "Nigel Croxon" <ncroxon@redhat.com>
Subject: Re: [PATCH] md/raid5: Don't set bi_status on STRIPE_WAIT_RESHAPE
Date: Tue, 14 Apr 2026 14:20:40 +0800	[thread overview]
Message-ID: <717caf7b-03ef-41d8-bbb3-f6ce5d4a49fa@fnnas.com> (raw)
In-Reply-To: <0e53701a-2471-9b72-eef8-27b168a0f3ea@huaweicloud.com>

Hi,

在 2026/4/14 9:25, Li Nan 写道:
>
>
> 在 2026/4/14 6:45, Benjamin Marzinski 写道:
>> When make_stripe_request() encounters a clone bio that crosses the
>> reshape position while the reshape cannot make progress, it was setting
>> bi->bi_status to BLK_STS_RESOURCE when returning STRIPE_WAIT_RESHAPE.
>> This will update the original bio's bi_status in md_end_clone_io().
>> Afterwards, md_handle_request() will wait for the device to become
>> unsuspended and submit a new cloned bio. However, even if that clone
>> completes successfully, it will not clear the original bio's bi_status.
>>
>> There's no need to set bi_status when retrying the bio. md will already
>> error out the bio correctly if it is set REQ_NOWAIT. Otherwise it will
>> be retried. dm-raid will already end the bio with DM_MAPIO_REQUEUE.
>>
>> Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
>> ---
>>   drivers/md/raid5.c | 1 -
>>   1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
>> index dc0c680ca199..690c65cd1e29 100644
>> --- a/drivers/md/raid5.c
>> +++ b/drivers/md/raid5.c
>> @@ -6042,7 +6042,6 @@ static enum stripe_result 
>> make_stripe_request(struct mddev *mddev,
>>       raid5_release_stripe(sh);
>>   out:
>>       if (ret == STRIPE_SCHEDULE_AND_RETRY && 
>> reshape_interrupted(mddev)) {
>> -        bi->bi_status = BLK_STS_RESOURCE;
>>           ret = STRIPE_WAIT_RESHAPE;
>>           pr_err_ratelimited("dm-raid456: io across reshape position 
>> while reshape can't make progress");
>>       }
>
> The link below leads to the same patch, which Kuai has already replied 
> to.
>
> https://lore.kernel.org/all/20260203095156.2349174-1-yangxiuwei@kylinos.cn/

Perhaps instead of clearing the error code from error path, this problem can be fixed
by resetting the error code from the issue path if original bio is resubmitted.

>
>
> -- 
> Thanks,
> Nan
>
>
-- 
Thansk,
Kuai

  reply	other threads:[~2026-04-14  6:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-13 22:45 [PATCH] md/raid5: Don't set bi_status on STRIPE_WAIT_RESHAPE Benjamin Marzinski
2026-04-14  1:25 ` Li Nan
2026-04-14  6:20   ` Yu Kuai [this message]
2026-04-14 18:19     ` Benjamin Marzinski
2026-04-14 19:03       ` [RFC PATCH] dm-raid: only requeue bios when dm is suspending Benjamin Marzinski

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=717caf7b-03ef-41d8-bbb3-f6ce5d4a49fa@fnnas.com \
    --to=yukuai@fnnas.com \
    --cc=bmarzins@redhat.com \
    --cc=dm-devel@lists.linux.dev \
    --cc=linan666@huaweicloud.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=ncroxon@redhat.com \
    --cc=song@kernel.org \
    --cc=xni@redhat.com \
    --cc=yukuai@alb-78bjiv52429oh8qptp.cn-shenzhen.alb.aliyuncs.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