Re: [PATCH RFC 0/3] md/raid1: data corruption with serialization
"Yu Kuai" <[email protected]>
| Newsgroups | gmane.linux.raid |
|---|---|
| Message-ID | <[email protected]> |
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