summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2006-10-03 10:15:59 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-03 17:04:18 +0200
commite8703fe1f5cdcff686f7eb0a46487b5a04a9324a (patch)
tree3b52bfa6ee57d59e059fd0e8d8504dbd3ee073b4 /init
parent[PATCH] md: fix duplicity of levels in md.txt (diff)
downloadlinux-e8703fe1f5cdcff686f7eb0a46487b5a04a9324a.tar.xz
linux-e8703fe1f5cdcff686f7eb0a46487b5a04a9324a.zip
[PATCH] md: remove MAX_MD_DEVS which is an arbitrary limit
Once upon a time we needed to fixed limit to the number of md devices, probably because we preallocated some array. This need no longer exists, but we still have an arbitrary limit. So remove MAX_MD_DEVS and allow as many devices as we can fit into the 'minor' part of a device number. Also remove some useless noise at init time (which reports MAX_MD_DEVS) and remove MD_THREAD_NAME_MAX which hasn't been used for a while. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'init')
-rw-r--r--init/do_mounts_md.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/init/do_mounts_md.c b/init/do_mounts_md.c
index 2429e1bf8c60..753dc54a6649 100644
--- a/init/do_mounts_md.c
+++ b/init/do_mounts_md.c
@@ -20,7 +20,7 @@ static struct {
int level;
int chunk;
char *device_names;
-} md_setup_args[MAX_MD_DEVS] __initdata;
+} md_setup_args[256] __initdata;
static int md_setup_ents __initdata;
@@ -61,10 +61,6 @@ static int __init md_setup(char *str)
return 0;
}
str1 = str;
- if (minor >= MAX_MD_DEVS) {
- printk(KERN_WARNING "md: md=%d, Minor device number too high.\n", minor);
- return 0;
- }
for (ent=0 ; ent< md_setup_ents ; ent++)
if (md_setup_args[ent].minor == minor &&
md_setup_args[ent].partitioned == partitioned) {
@@ -72,7 +68,7 @@ static int __init md_setup(char *str)
"Replacing previous definition.\n", partitioned?"d":"", minor);
break;
}
- if (ent >= MAX_MD_DEVS) {
+ if (ent >= ARRAY_SIZE(md_setup_args)) {
printk(KERN_WARNING "md: md=%s%d - too many md initialisations\n", partitioned?"d":"", minor);
return 0;
}