Linux RAID subsystem development
 help / color / mirror / Atom feed
From: "yu kuai" <yukuai@fygo.io>
To: "Chen Cheng" <chencheng@fnnas.com>, <linux-raid@vger.kernel.org>,
	 <yukuai@fygo.io>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] md/raid1: protect sequential read hints for read balance
Date: Thu, 30 Jul 2026 16:27:43 +0800	[thread overview]
Message-ID: <0d46c447-4a2e-4b28-a33e-24253656bfa5@fygo.io> (raw)
In-Reply-To: <20260623075940.2476255-1-chencheng@fnnas.com>

在 2026/6/23 15:59, Chen Cheng 写道:

> From: Chen Cheng<chencheng@fnnas.com>
>
> The patch just suppress KCSAN noise. No functional change.
>
> KCSAN reports a race, point to update_read_sectors() update next_seq_sect vs.
> read next_seq_sect.
>
> Protect next_seq_sect and seq_start with READ_ONCE/WRITE_ONCE, otherwise,
> read balance see stale sequential-read hints.
>
> KCSAN report:
> ==============
>   BUG: KCSAN: data-race in raid1_read_request / raid1_read_request
>
>   write to 0xffff8e3a2d6736d0 of 8 bytes by task 593784 on cpu 10:
>    raid1_read_request+0xe5a/0x19f0
>    raid1_make_request+0xdf/0x1990
>    md_handle_request+0x4a2/0xa40
>    [...]
>
>   read to 0xffff8e3a2d6736d0 of 8 bytes by task 593776 on cpu 11:
>    raid1_read_request+0xe3f/0x19f0
>    raid1_make_request+0xdf/0x1990
>    md_handle_request+0x4a2/0xa40
>    [...]
>
>   value changed: 0x0000000000356368 -> 0x0000000000356370
>
> Signed-off-by: Chen Cheng<chencheng@fnnas.com>
> ---
>   drivers/md/raid1.c | 18 ++++++++++--------
>   1 file changed, 10 insertions(+), 8 deletions(-)
Applied to md-7.3

-- 
Thanks,
Kuai

      parent reply	other threads:[~2026-07-30  8:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-23  7:59 [PATCH] md/raid1: protect sequential read hints for read balance Chen Cheng
2026-07-05  9:31 ` yu kuai
2026-07-30  8:27 ` yu kuai [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=0d46c447-4a2e-4b28-a33e-24253656bfa5@fygo.io \
    --to=yukuai@fygo.io \
    --cc=chencheng@fnnas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    /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