public inbox for linux-raid@vger.kernel.org
 help / color / mirror / Atom feed
From: Kenta Akagi <k@mgml.me>
To: Song Liu <song@kernel.org>, Yu Kuai <yukuai@fnnas.com>,
	Shaohua Li <shli@fb.com>, Mariusz Tkaczyk <mtkaczyk@kernel.org>,
	Xiao Ni <xni@redhat.com>
Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org,
	Kenta Akagi <k@mgml.me>, Li Nan <linan122@huawei.com>
Subject: [PATCH v6 2/2] md/raid10: fix failfast read error not rescheduled
Date: Mon,  5 Jan 2026 23:40:25 +0900	[thread overview]
Message-ID: <20260105144025.12478-3-k@mgml.me> (raw)
In-Reply-To: <20260105144025.12478-1-k@mgml.me>

raid10_end_read_request lacks a path to retry when a FailFast IO fails.
As a result, when Failfast Read IOs fail on all rdevs, the upper layer
receives EIO, without read rescheduled.

Looking at the two commits below, it seems only raid10_end_read_request
lacks the failfast read retry handling, while raid1_end_read_request has
it. In RAID1, the retry works as expected.
* commit 8d3ca83dcf9c ("md/raid10: add failfast handling for reads.")
* commit 2e52d449bcec ("md/raid1: add failfast handling for reads.")

This commit will make the failfast read bio for the last rdev in raid10
retry if it fails.

Fixes: 8d3ca83dcf9c ("md/raid10: add failfast handling for reads.")
Signed-off-by: Kenta Akagi <k@mgml.me>
Reviewed-by: Li Nan <linan122@huawei.com>
---
 drivers/md/raid10.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index b33149aa5b29..8a254bab52e8 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -401,6 +401,13 @@ static void raid10_end_read_request(struct bio *bio)
 		 * wait for the 'master' bio.
 		 */
 		set_bit(R10BIO_Uptodate, &r10_bio->state);
+	} else if (test_bit(FailFast, &rdev->flags) &&
+		 test_bit(R10BIO_FailFast, &r10_bio->state)) {
+		/*
+		 * This was a fail-fast read so we definitely
+		 * want to retry
+		 */
+		;
 	} else if (!raid1_should_handle_error(bio)) {
 		uptodate = 1;
 	} else {
-- 
2.50.1


      parent reply	other threads:[~2026-01-05 14:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-05 14:40 [PATCH v6 0/2] Don't set MD_BROKEN on failfast bio failure Kenta Akagi
2026-01-05 14:40 ` [PATCH v6 1/2] md: Don't set MD_BROKEN for RAID1 and RAID10 when using FailFast Kenta Akagi
2026-01-06  2:57   ` Li Nan
2026-01-06  7:59     ` Xiao Ni
2026-01-06  9:11       ` Li Nan
2026-01-06  9:25         ` Xiao Ni
2026-01-06 11:14           ` Li Nan
2026-01-06 12:30     ` Kenta Akagi
2026-01-07  2:09       ` Li Nan
2026-01-07  3:35       ` Xiao Ni
2026-01-07  6:43         ` Kenta Akagi
2026-01-16  2:04         ` Kenta Akagi
2026-01-05 14:40 ` Kenta Akagi [this message]

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=20260105144025.12478-3-k@mgml.me \
    --to=k@mgml.me \
    --cc=linan122@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=mtkaczyk@kernel.org \
    --cc=shli@fb.com \
    --cc=song@kernel.org \
    --cc=xni@redhat.com \
    --cc=yukuai@fnnas.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox