[PATCH] md/raid10: don't fail a replacement on a successful resync write

From
Miroslav Cimerman <hidden>
Date
2026-12-03 01:16:34
Also in
lkml
raid10_sync_request() sets bi_status of a resync write to a
replacement to BLK_STS_IOERR and does not clear it before submitting.
A successful write does not change bi_status, so end_sync_write() fails
the replacement on the first chunk a resync writes to it.

Remove the bi_status assignment. raid10_alloc_init_r10buf() already
reset the bio, so bi_status starts at 0.

Fixes: 8be185f2c9d5 ("raid10: Use bio_reset()")
Cc: <redacted>
Signed-off-by: Miroslav Cimerman <redacted>
---
The assignment was harmless until 8be185f2c9d5 removed the loop that
set BIO_UPTODATE again before submission. 7bb23c493405 restored it for
the reads only.

 drivers/md/raid10.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 68f42cad32a5..6950212bdadc 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -3547,7 +3547,6 @@ static sector_t raid10_sync_request(struct mddev *mddev, sector_t sector_nr,
 
 			/* Need to set up for writing to the replacement */
 			bio = r10_bio->devs[i].repl_bio;
-			bio->bi_status = BLK_STS_IOERR;
 
 			sector = r10_bio->devs[i].addr;
 			bio->bi_next = biolist;
base-commit: c526b7cd32f75fea6021ffdab287b81cf38ddeb7
-- 
2.53.0
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help