public inbox for linux-raid@vger.kernel.org
 help / color / mirror / Atom feed
From: Xiao Ni <xni@redhat.com>
To: yukuai@fnnas.com
Cc: linux-raid@vger.kernel.org
Subject: [PATCH RFC 0/3] md/raid1: data corruption with serialization
Date: Wed,  4 Feb 2026 22:58:54 +0800	[thread overview]
Message-ID: <20260204145912.9463-1-xni@redhat.com> (raw)

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.

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(-)

-- 
2.50.1 (Apple Git-155)


             reply	other threads:[~2026-02-04 14:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-04 14:58 Xiao Ni [this message]
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 ` [PATCH RFC 0/3] md/raid1: data corruption with serialization Yu Kuai
2026-02-05  0:34   ` 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=20260204145912.9463-1-xni@redhat.com \
    --to=xni@redhat.com \
    --cc=linux-raid@vger.kernel.org \
    --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