2e35d7583b
- Update for latest mdadm-4.1+ patches, this is required by jsc#SLE-10078 and jsc#SLE-9348. Mostly the purpose is for latest Intel IMSM raid support. The following patches also include previous patches with new re-ordered prefix numbers. - Makefile: install mdadm_env.sh to /usr/lib/mdadm (bsc#1111960) 0000-Makefile-install-mdadm_env.sh-to-usr-lib-mdadm.patch - Assemble: keep MD_DISK_FAILFAST and MD_DISK_WRITEMOSTLY flag (jsc#SLE-10078, jsc#SLE-9348) 0001-Assemble-keep-MD_DISK_FAILFAST-and-MD_DISK_WRITEMOST.patch - Document PART-POLICY lines (jsc#SLE-10078, jsc#SLE-9348) 0002-Document-PART-POLICY-lines.patc - policy: support devices with multiple paths. (jsc#SLE-10078, jsc#SLE-9348) 0003-policy-support-devices-with-multiple-paths.patch - mdcheck: add systemd unit files to run mdcheck. (bsc#1115407) 0004-mdcheck-add-systemd-unit-files-to-run-mdcheck.patch - Monitor: add system timer to run --oneshot periodically (bsc#1115407) 0005-Monitor-add-system-timer-to-run-oneshot-periodically.patch - imsm: update metadata correctly while raid10 double (jsc#SLE-10078, jsc#SLE-9348) 0006-imsm-update-metadata-correctly-while-raid10-double-d.patch - Assemble: mask FAILFAST and WRITEMOSTLY flags when finding (jsc#SLE-10078, jsc#SLE-9348) 0007-Assemble-mask-FAILFAST-and-WRITEMOSTLY-flags-when-fi.patch - Grow: avoid overflow in compute_backup_blocks() (jsc#SLE-10078, jsc#SLE-9348) 0008-Grow-avoid-overflow-in-compute_backup_blocks.patch - Grow: report correct new chunk size. (jsc#SLE-10078, jsc#SLE-9348) 0009-Grow-report-correct-new-chunk-size.patch OBS-URL: https://build.opensuse.org/request/show/781064 OBS-URL: https://build.opensuse.org/package/show/Base:System/mdadm?expand=0&rev=181
53 lines
2.0 KiB
Diff
53 lines
2.0 KiB
Diff
From 7bd59e7926c6921121087eb067befaa896c900a4 Mon Sep 17 00:00:00 2001
|
|
From: NeilBrown <neilb@suse.de>
|
|
Date: Wed, 18 Sep 2019 15:12:55 +1000
|
|
Subject: [PATCH] udev: allow for udev attribute reading bug.
|
|
Git-commit: 7bd59e7926c6921121087eb067befaa896c900a4
|
|
Patch-mainline: mdadm-4.1+
|
|
References: jsc#SLE-10078, jsc#SLE-9348
|
|
|
|
There is a bug in udev (which will hopefully get fixed, but
|
|
we should allow for it anways).
|
|
When reading a sysfs attribute, it first reads the whole
|
|
value of the attribute, then reads again expecting to get
|
|
a read of 0 bytes, like you would with an ordinary file.
|
|
If the sysfs attribute changed between these two reads, it can
|
|
get a mixture of two values.
|
|
|
|
In particular, if it reads when 'array_state' is changing from
|
|
'clear' to 'inactive', it can find the value as "clear\nve".
|
|
|
|
This causes the test for "|clear|active" to fail, so systemd is allowed
|
|
to think that the array is ready - when it isn't.
|
|
|
|
So change the pattern to allow for this but adding a wildcard at
|
|
the end.
|
|
Also don't allow for an empty string - reading array_state will
|
|
never return an empty string - if it exists at all, it will be
|
|
non-empty.
|
|
|
|
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
|
|
Signed-off-by: Coly Li <colyli@suse.de>
|
|
|
|
---
|
|
udev-md-raid-arrays.rules | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/udev-md-raid-arrays.rules b/udev-md-raid-arrays.rules
|
|
index d391665..c8fa8e8 100644
|
|
--- a/udev-md-raid-arrays.rules
|
|
+++ b/udev-md-raid-arrays.rules
|
|
@@ -14,7 +14,7 @@ ENV{DEVTYPE}=="partition", GOTO="md_ignore_state"
|
|
# never leave state 'inactive'
|
|
ATTR{md/metadata_version}=="external:[A-Za-z]*", ATTR{md/array_state}=="inactive", GOTO="md_ignore_state"
|
|
TEST!="md/array_state", ENV{SYSTEMD_READY}="0", GOTO="md_end"
|
|
-ATTR{md/array_state}=="|clear|inactive", ENV{SYSTEMD_READY}="0", GOTO="md_end"
|
|
+ATTR{md/array_state}=="clear*|inactive", ENV{SYSTEMD_READY}="0", GOTO="md_end"
|
|
LABEL="md_ignore_state"
|
|
|
|
IMPORT{program}="BINDIR/mdadm --detail --no-devices --export $devnode"
|
|
--
|
|
2.25.0
|
|
|