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