Dne 28. 05. 25 v 3:28 Xiao Ni napsal(a):
CC Heinz who is a dm-raid expert. But he is on holiday this week.
On Tue, May 27, 2025 at 4:24 PM Yu Kuai <yukuai1@xxxxxxxxxxxxxxx> wrote:
Hi, Zdenek Kabelac
在 2025/05/27 16:14, Yu Kuai 写道:
From: Yu Kuai <yukuai3@xxxxxxxxxx>
IO with REQ_RAHEAD or REQ_NOWAIT can fail early, even if the storage medium
is fine, hence record badblocks or remove the disk from array does not
make sense.
This problem if found by lvm2 test lvcreate-large-raid, where dm-zero
will fail read ahead IO directly.
Reported-and-tested-by: Mikulas Patocka <mpatocka@xxxxxxxxxx>
Closes: https://lore.kernel.org/all/34fa755d-62c8-4588-8ee1-33cb1249bdf2@xxxxxxxxxx/
Signed-off-by: Yu Kuai <yukuai3@xxxxxxxxxx>
---
Changes in v2:
- handle REQ_NOWAIT as well.
drivers/md/raid1-10.c | 10 ++++++++++
drivers/md/raid1.c | 19 ++++++++++---------
drivers/md/raid10.c | 11 ++++++-----
3 files changed, 26 insertions(+), 14 deletions(-)
Just to let you know that while testing lvcreate-large-raid, the test
can fail sometime:
[ 0:12.021] ## DEBUG0: 08:11:43.596775 lvcreate[8576]
device_mapper/ioctl/libdm-iface.c:2118 device-mapper: create ioctl on
LVMTEST8371vg1-LV1_rmeta_0
LVM-iqJjW9HItbME2d4DC2S7D58zd2omecjf0yQN83foinyxHaPoZqGEnX4rRUN7i0kH
failed: Device or resource busy
Hi
This issue is caused by occasional race with udev - which holds open our
internal device open while we are deactivating raid LV.
We are currently trying to resolve this issue.
Regards
Zdenek