Commit 40fa9470 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] late-boot fixes

Grrr...  Two bugs in a patch that had moved md setup to late boot:

a) we need md_run_setup() run before parsing root name.
b) it's create_dev("/dev/md0",...), not create_dev("md0",...) ;-/
parent 739659cc
...@@ -844,6 +844,14 @@ static void __init md_run_setup(void); ...@@ -844,6 +844,14 @@ static void __init md_run_setup(void);
void prepare_namespace(void) void prepare_namespace(void)
{ {
int is_floppy; int is_floppy;
#ifdef CONFIG_DEVFS_FS
sys_mount("devfs", "/dev", "devfs", 0, NULL);
do_devfs = 1;
#endif
md_run_setup();
if (saved_root_name[0]) { if (saved_root_name[0]) {
char *p = saved_root_name; char *p = saved_root_name;
ROOT_DEV = name_to_dev_t(p); ROOT_DEV = name_to_dev_t(p);
...@@ -851,20 +859,15 @@ void prepare_namespace(void) ...@@ -851,20 +859,15 @@ void prepare_namespace(void)
p += 5; p += 5;
strcpy(root_device_name, p); strcpy(root_device_name, p);
} }
is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR; is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR;
#ifdef CONFIG_BLK_DEV_INITRD #ifdef CONFIG_BLK_DEV_INITRD
if (!initrd_start) if (!initrd_start)
mount_initrd = 0; mount_initrd = 0;
real_root_dev = ROOT_DEV; real_root_dev = ROOT_DEV;
#endif #endif
#ifdef CONFIG_DEVFS_FS
sys_mount("devfs", "/dev", "devfs", 0, NULL);
do_devfs = 1;
#endif
md_run_setup();
create_dev("/dev/root", ROOT_DEV, NULL); create_dev("/dev/root", ROOT_DEV, NULL);
/* This has to be before mounting root, because even readonly mount of reiserfs would replay /* This has to be before mounting root, because even readonly mount of reiserfs would replay
...@@ -1277,7 +1280,7 @@ __setup("md=", md_setup); ...@@ -1277,7 +1280,7 @@ __setup("md=", md_setup);
static void __init md_run_setup(void) static void __init md_run_setup(void)
{ {
#ifdef CONFIG_BLK_DEV_MD #ifdef CONFIG_BLK_DEV_MD
create_dev("md0", MKDEV(MD_MAJOR, 0), "md/0"); create_dev("/dev/md0", MKDEV(MD_MAJOR, 0), "md/0");
if (raid_setup_args.noautodetect) if (raid_setup_args.noautodetect)
printk(KERN_INFO "md: Skipping autodetection of RAID arrays. (raid=noautodetect)\n"); printk(KERN_INFO "md: Skipping autodetection of RAID arrays. (raid=noautodetect)\n");
else { else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment