Re: [PATCH 1/1] md/raid5: don't set bi_status for requeued IO in STRIPE_WAIT_RESHAPE
"Yu Kuai" <[email protected]>
| Newsgroups | gmane.linux.raid |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]>
> ---
> 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