mdadm/mdadm-udev.patch
Xiao Ni 02e1f69890 Update to latest upstream
There some bugs need to be fixed.

bug2127101 Reshape is started with not allowed chunk size
patch (super-intel: make freesize not required for chunk size migration)

bug2139789 Installation hangs after RAID degradation
bug2149292 mdadm: Couldn't open /dev/vda3 for write - not zeroing
patch (mdadm/udev: Don't handle change event on raw devices)

bug2151209 Can't remove disk when unplugging a disk
patch (incremental, manage: do not verify if remove is safe)

bug2148945 mdadm --fail /dev/md0 /dev/pmem1s failed
patch (Manage: do not check array state when drive is removed)

Resolves: rhbz#2127101, rhbz#2139789, rhbz#2149292, rhbz#2151209, rhbz#2148945

Signed-off-by: Xiao Ni <xni@redhat.com>
2023-01-06 21:58:10 +08:00

27 lines
994 B
Diff

--- mdadm/udev-md-raid-assembly.rules.orig 2023-01-06 16:37:03.780756100 +0800
+++ mdadm/udev-md-raid-assembly.rules 2023-01-06 17:04:09.536159980 +0800
@@ -5,6 +5,9 @@
ENV{ANACONDA}=="?*", GOTO="md_inc_end"
# assemble md arrays
+# Also don't process disks that are slated to be a multipath device
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="md_inc_end"
+
SUBSYSTEM!="block", GOTO="md_inc_end"
# skip non-initialized devices
@@ -33,6 +36,13 @@
LABEL="md_inc"
+# Make sure we don't handle dm devices when some limits are set.
+# And linux_raid_member only be set when change/remove event happen.
+# So we don't need to consider add event here.
+KERNEL=="dm-*", ENV{DM_UDEV_RULES_VSN}!="?*", GOTO="md_inc_end"
+KERNEL=="dm-*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", GOTO="md_inc_end"
+KERNEL=="dm-*", ENV{DM_SUSPENDED}=="1", GOTO="md_inc_end"
+
# Bare disks are ready when add event happens, the raid can be assembled.
ACTION=="change", KERNEL!="dm-*|md*", GOTO="md_inc_end"