Re: [PATCH 1/1] md/raid5: don't set bi_status for requeued IO in STRIPE_WAIT_RESHAPE
Yang Xiuwei <[email protected]>
| Newsgroups | gmane.linux.raid |
|---|---|
| Message-ID | <[email protected]> |
Hi,
On 2026/2/3 17:51, Yang Xiuwei wrote:
>> 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;
On 2026/2/26 13:44, Yu Kuai wrote:
> 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.
Thanks for your review and feedback.
I will carefully re-read the relevant code logic, especially:
- The complete flow of DM layer requeue mechanism
- The bio handling path in the reshape flow
- Verify whether the bio will be requeued rather than directly returned to the user
Best regards,
Yang Xiuwei