在 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 <[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 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/[email protected]/

--
Thanks,
Nan


Reply via email to