From: "Yu Kuai" <yukuai@fnnas.com>
To: "Yang Xiuwei" <yangxiuwei@kylinos.cn>, <song@kernel.org>,
<snitzer@kernel.org>, <xni@redhat.com>, <yukuai@fnnas.com>
Cc: <linux-raid@vger.kernel.org>
Subject: Re: [PATCH 1/1] md/raid5: don't set bi_status for requeued IO in STRIPE_WAIT_RESHAPE
Date: Thu, 26 Feb 2026 13:44:37 +0800 [thread overview]
Message-ID: <71e50b0e-0669-4a40-84d5-3c3061dfb229@fnnas.com> (raw)
In-Reply-To: <20260203095156.2349174-1-yangxiuwei@kylinos.cn>
Hi,
在 2026/2/3 17:51, Yang Xiuwei 写道:
> When reshape is interrupted, IO that needs to be requeued incorrectly
> sets bi->bi_status to BLK_STS_RESOURCE. This causes md_free_cloned_bio()
> to copy the error status to the original bio, which is wrong because
> requeued IO should be retried, not failed.
>
> This was found during LVM testing where reshape operations under I/O
> load would cause I/O errors and filesystem corruption.
>
> Remove the bi_status assignment to prevent incorrect error marking.
>
> Fixes: 41425f96d7aa ("dm-raid456, md/raid456: fix a deadlock for dm-raid456 while io concurrent with reshape")
>
> Signed-off-by: Yang Xiuwei <yangxiuwei@kylinos.cn>
> ---
> drivers/md/raid5.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
> index 8dc98f545969..128c0b7e9f54 100644
> --- a/drivers/md/raid5.c
> +++ b/drivers/md/raid5.c
> @@ -6038,7 +6038,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;
This will make the problem much worse, you should notice this bio is returned directly
to user, because reshape is interrupted and nothing can be read or write, and you're
returning wrong data to user.
> ret = STRIPE_WAIT_RESHAPE;
> pr_err_ratelimited("dm-raid456: io across reshape position while reshape can't make progress");
> }
--
Thansk,
Kuai
next prev parent reply other threads:[~2026-02-26 5:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-03 9:51 [PATCH 1/1] md/raid5: don't set bi_status for requeued IO in STRIPE_WAIT_RESHAPE Yang Xiuwei
2026-02-26 5:44 ` Yu Kuai [this message]
2026-02-26 8:28 ` Yang Xiuwei
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=71e50b0e-0669-4a40-84d5-3c3061dfb229@fnnas.com \
--to=yukuai@fnnas.com \
--cc=linux-raid@vger.kernel.org \
--cc=snitzer@kernel.org \
--cc=song@kernel.org \
--cc=xni@redhat.com \
--cc=yangxiuwei@kylinos.cn \
/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