public inbox for linux-raid@vger.kernel.org
 help / color / mirror / Atom feed
From: "Yu Kuai" <yukuai@fnnas.com>
To: "Xiao Ni" <xni@redhat.com>
Cc: <linux-raid@vger.kernel.org>, <yukuai@fnnas.com>
Subject: Re: [PATCH RFC 0/3] md/raid1: data corruption with serialization
Date: Wed, 4 Feb 2026 23:58:29 +0800	[thread overview]
Message-ID: <a058e5a3-e96c-4feb-8f9d-e1135951973c@fnnas.com> (raw)
In-Reply-To: <20260204145912.9463-1-xni@redhat.com>

Hi,

在 2026/2/4 22:58, Xiao Ni 写道:
> A data corruption can happen when using serialization for raid1.
> Serialization is not enabled by default. But it looks like there
> is a data corruption risk if serialization is closed. Because the
> lower driver can't guarantee the sequence which io is written first.
> So it's possible that different member disks will have different
> data for nvme devices. This patch set doesn't open serialization
> by default.

An important idea is that if there are filesystem on top of raid1/10/5, there
is no need to consider overlap bio. The only case for serialization is WriteMostly,
that bio can be returned to user while it's not done for slow disks. And that is
the reason why serialization is for rdev.

We definitely will not enable serialization by default, because there will
be huge performance degradation. And I don't think we'll handle the case user
manage data with raw disk, and write to the same area concurrently. At last, if
there are still problem with WriteMostly case, please rebase and keep serialization
for rdev.

>
> Xiao Ni (3):
>    md: add return value of mddev_create_serial_pool
>    md/raid1: fix data corruption by moving serialization to mddev level
>    md/raid1: fix incorrect sector range in serialization
>
>   drivers/md/md-bitmap.c |  28 +++++--
>   drivers/md/md.c        | 171 ++++++++++++++---------------------------
>   drivers/md/md.h        |  30 ++++----
>   drivers/md/raid1.c     |  47 ++++++-----
>   4 files changed, 115 insertions(+), 161 deletions(-)
>
-- 
Thansk,
Kuai

  parent reply	other threads:[~2026-02-04 15:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-04 14:58 [PATCH RFC 0/3] md/raid1: data corruption with serialization Xiao Ni
2026-02-04 14:58 ` [PATCH RFC 1/3] md: add return value of mddev_create_serial_pool Xiao Ni
2026-02-04 14:58 ` [PATCH RFC 2/3] md/raid1: fix data corruption by moving serialization to mddev level Xiao Ni
2026-02-04 14:58 ` [PATCH RFC 3/3] md/raid1: fix incorrect sector range in serialization Xiao Ni
2026-02-04 15:58 ` Yu Kuai [this message]
2026-02-05  0:34   ` [PATCH RFC 0/3] md/raid1: data corruption with serialization Xiao Ni
2026-02-05  1:06     ` Xiao Ni
2026-02-05  1:48       ` Yu Kuai
2026-02-05  2:03         ` Xiao Ni
2026-02-05  1:44     ` Yu Kuai
2026-02-05  1:56       ` Xiao Ni

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=a058e5a3-e96c-4feb-8f9d-e1135951973c@fnnas.com \
    --to=yukuai@fnnas.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=xni@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox