All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mikulas Patocka <mpatocka@redhat.com>
To: Yu Kuai <yukuai1@huaweicloud.com>
Cc: Song Liu <song@kernel.org>,
	zkabelac@redhat.com,  linux-raid@vger.kernel.org,
	dm-devel@lists.linux.dev,  "yukuai (C)" <yukuai3@huawei.com>
Subject: Re: [PATCH] md/raid1,raid10: don't pass down the REQ_RAHEAD flag
Date: Mon, 19 May 2025 14:15:10 +0200 (CEST)	[thread overview]
Message-ID: <068abc04-ffe4-e2df-95e8-9812031f6222@redhat.com> (raw)
In-Reply-To: <b560f87d-0072-91be-2a87-43f3510737d1@huaweicloud.com>



On Mon, 19 May 2025, Yu Kuai wrote:

> Hi,
> 
> Please ignore the last reply, I misunderstand your commit message, I
> thought you said dm-raid, actually you said mdraid, and it's correct,
> if read_bio faild raid1/10 will set badblocks which is not expected.
> 
> Then for reada head IO, I still think don't kill REQ_RAHEAD for
> underlying disks is better, what do you think about skip handling IO
> error for ead ahead IO?
> 
> diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
> index 657d481525be..b8b4fead31f3 100644
> --- a/drivers/md/raid1.c
> +++ b/drivers/md/raid1.c
> @@ -380,7 +380,10 @@ static void raid1_end_read_request(struct bio *bio)
>                 /* This was a fail-fast read so we definitely
>                  * want to retry */
>                 ;
> -       else {
> +       else if (bio->bi_opf & REQ_RAHEAD) {
> +               /* don't handle readahead error, which can fail at anytime. */
> +               uptodate = 1;
> +       } else {
>                 /* If all other devices have failed, we want to return
>                  * the error upwards rather than fail the last device.
>                  * Here we redefine "uptodate" to mean "Don't want to retry"
> diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
> index dce06bf65016..4d51aaf3b39b 100644
> --- a/drivers/md/raid10.c
> +++ b/drivers/md/raid10.c
> @@ -399,6 +399,9 @@ static void raid10_end_read_request(struct bio *bio)
>                  * wait for the 'master' bio.
>                  */
>                 set_bit(R10BIO_Uptodate, &r10_bio->state);
> +       } else if (bio->bi_opf & REQ_RAHEAD) {
> +               /* don't handle readahead error, which can fail at anytime. */
> +               uptodate = 1;
>         } else {
>                 /* If all other devices that store this block have
>                  * failed, we want to return the error upwards rather
> 
> Thanks,
> Kuai

I confirm that this patch fixes the test.

Tested-by: Mikulas Patocka <mpatocka@redhat.com>

Mikulas


      parent reply	other threads:[~2025-05-19 12:15 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-16 16:00 LVM2 test breakage Mikulas Patocka
2025-05-19  1:11 ` Yu Kuai
2025-05-19  6:41   ` Yu Kuai
2025-05-19 10:10     ` Mikulas Patocka
     [not found]       ` <81c5847a-cfd8-4f9f-892c-62cca3d17e63@redhat.com>
2025-05-19 11:07         ` Yu Kuai
2025-05-19 13:55           ` Zdenek Kabelac
2025-05-20  1:45             ` Yu Kuai
2025-05-20  1:53               ` Yu Kuai
2025-05-20  3:47                 ` Su Yue
2025-05-20  6:12                   ` Yu Kuai
2025-05-19 10:08   ` Mikulas Patocka
2025-05-19 10:09     ` [PATCH] md/raid1,raid10: don't pass down the REQ_RAHEAD flag Mikulas Patocka
2025-05-19 11:19       ` Yu Kuai
2025-05-19 11:39         ` Yu Kuai
2025-05-19 12:05           ` Mikulas Patocka
2025-05-19 12:34             ` Yu Kuai
2025-05-20  6:28               ` Yu Kuai
2025-05-19 12:15           ` Mikulas Patocka [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=068abc04-ffe4-e2df-95e8-9812031f6222@redhat.com \
    --to=mpatocka@redhat.com \
    --cc=dm-devel@lists.linux.dev \
    --cc=linux-raid@vger.kernel.org \
    --cc=song@kernel.org \
    --cc=yukuai1@huaweicloud.com \
    --cc=yukuai3@huawei.com \
    --cc=zkabelac@redhat.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 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.