All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miroslav Cimerman <mc@raidlab.org>
To: Song Liu <song@kernel.org>, Yu Kuai <yukuai@fygo.io>
Cc: Li Nan <magiclinan@didiglobal.com>, Xiao Ni <xiao@kernel.org>,
	NeilBrown <neil@brown.name>,
	linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] md/raid10: don't fail a replacement on a successful resync write
Date: Thu,  3 Dec 2026 01:16:06 +0000	[thread overview]
Message-ID: <20261203011606.408794-1-mc@raidlab.org> (raw)

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


                 reply	other threads:[~2026-12-03  1:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261203011606.408794-1-mc@raidlab.org \
    --to=mc@raidlab.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=magiclinan@didiglobal.com \
    --cc=neil@brown.name \
    --cc=song@kernel.org \
    --cc=xiao@kernel.org \
    --cc=yukuai@fygo.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.