All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] md/raid10: don't fail a replacement on a successful resync write
@ 2026-12-03  1:16 Miroslav Cimerman
  0 siblings, 0 replies; only message in thread
From: Miroslav Cimerman @ 2026-12-03  1:16 UTC (permalink / raw)
  To: Song Liu, Yu Kuai; +Cc: Li Nan, Xiao Ni, NeilBrown, linux-raid, linux-kernel

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: stable@vger.kernel.org
Signed-off-by: Miroslav Cimerman <mc@raidlab.org>
---
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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-12-03  1:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03  1:16 [PATCH] md/raid10: don't fail a replacement on a successful resync write Miroslav Cimerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.