regressions.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH - mdadm] mdopen: always try create_named_array()
@ 2023-03-14  0:06 NeilBrown
  2023-03-14  9:11 ` Mariusz Tkaczyk
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: NeilBrown @ 2023-03-14  0:06 UTC (permalink / raw)
  To: Jes Sorensen
  Cc: Mariusz Tkaczyk, Song Liu, Linux regressions mailing list,
	linux-raid, LKML, Nikolay Kichukov


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>
---
 mdopen.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mdopen.c b/mdopen.c
index d18c931996d2..810f79a3d19a 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.39.2


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-03-30  4:55 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-14  0:06 [PATCH - mdadm] mdopen: always try create_named_array() NeilBrown
2023-03-14  9:11 ` Mariusz Tkaczyk
2023-03-19 16:36 ` Jes Sorensen
2023-03-19 22:09   ` NeilBrown
2023-03-20 17:15     ` Jes Sorensen
2023-03-21  8:49       ` Mariusz Tkaczyk
2023-03-22  3:00 ` Xiao Ni
2023-03-22  3:24   ` NeilBrown
2023-03-22  6:51     ` Mariusz Tkaczyk
2023-03-23  2:09     ` Xiao Ni
2023-03-29 21:51     ` NeilBrown
2023-03-30  0:10       ` Xiao Ni
2023-03-30  3:15         ` NeilBrown
2023-03-30  4:55           ` Xiao Ni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).