forked from pool/mdadm
fba44b112e
- Fixes for mdmon to ensure it run at the right time in the fight mount namespace. This fixes various problems with IMSM raid arrays in 15-SP4 (bsc#1205493, bsc#1205830) - mdmon: fix segfault 0052-mdmon-fix-segfault.patch - util: remove obsolete code from get_md_name 0053-util-remove-obsolete-code-from-get_md_name.patch - mdmon: don't test both 'all' and 'container_name'. 0054-mdmon-don-t-test-both-all-and-container_name.patch - mdmon: change systemd unit file to use --foreground 0055-mdmon-change-systemd-unit-file-to-use-foreground.patch - mdmon: Remove need for KillMode=none 0056-mdmon-Remove-need-for-KillMode-none.patch - mdmon: Improve switchroot interactions. 0057-mdmon-Improve-switchroot-interactions.patch - mdopen: always try create_named_array() 0058-mdopen-always-try-create_named_array.patch - Improvements for IMSM_NO_PLATFORM testing 0059-Improvements-for-IMSM_NO_PLATFORM-testing.patch OBS-URL: https://build.opensuse.org/request/show/1082557 OBS-URL: https://build.opensuse.org/package/show/Base:System/mdadm?expand=0&rev=223
41 lines
1.3 KiB
Diff
41 lines
1.3 KiB
Diff
From 2e10c46d0906b1a1ec40e8f5005ccb63125dcd9e Mon Sep 17 00:00:00 2001
|
|
From: NeilBrown <neilb@suse.de>
|
|
Date: Tue, 14 Mar 2023 11:06:25 +1100
|
|
Subject: [PATCH] mdopen: always try create_named_array()
|
|
|
|
mdopen() will use create_named_array() to ask the kernel to create the
|
|
given md array, but only if it is given a number or name.
|
|
If it is NOT given a name and is required to choose one itself using
|
|
find_free_devnm() it does NOT use create_named_array().
|
|
|
|
On kernels with CONFIG_BLOCK_LEGACY_AUTOLOAD not set, this can result in
|
|
failure to assemble an array. This can particularly seen when the
|
|
"name" of the array begins with a host name different to the name of the
|
|
host running the command.
|
|
|
|
So add the missing call to create_named_array().
|
|
|
|
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217074
|
|
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
Acked-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
|
|
Signed-off-by: Jes Sorensen <jes@trained-monkey.org>
|
|
---
|
|
mdopen.c | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
diff --git a/mdopen.c b/mdopen.c
|
|
index d18c931..810f79a 100644
|
|
--- a/mdopen.c
|
|
+++ b/mdopen.c
|
|
@@ -370,6 +370,7 @@ int create_mddev(char *dev, char *name, int autof, int trustworthy,
|
|
}
|
|
if (block_udev)
|
|
udev_block(devnm);
|
|
+ create_named_array(devnm);
|
|
}
|
|
|
|
sprintf(devname, "/dev/%s", devnm);
|
|
--
|
|
2.35.3
|
|
|