lkml.org 
[lkml]   [2000]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] rootfstype boot argument
Hi,

A few more comments on your patch (sorry for strange enumeration):

-1. __setup("rootfstype", root_fstype_setup); is a bug, you probably meant

__setup("rootfstype=", root_fstype_setup);
I am just judging by these kernel messages, without even looking at your
code:

request_module[=bfs]: Root fs not mounted
Warning: file system option =bfs not found

(btw, while we are at the subject of messages, the above Warning should
have KERN_WARNING priority in your code).

0. It is nice to keep __setup() thing close to the actual function. In
your case it should be in fs/super.c and not in init/main.c

1. why does root_fstype_setup() use sprintf() and not strcpy()?

2. why isn't root_fs_type[] array __initdata? Do we need that data after
the system is booted?

3. Have you tested it? I don't see how can it possibly work if you still
have a loop in mount_root():

for (fs_type = file_systems ; fs_type ; fs_type = fs_type->next) {
...
}
so, regardless of what has been passed on the command line, it will still
go through the list of registered filesystems and invoke read_super()
method of each - the whole point of having rootfs (or rootfstype)
parameter is that one does not invoke potentially dangerous read_super()
methods one after another for a great multitude of registered filesystems.
Realistically, it tries ext2 first (or one f the first few) because of the
explicit registration order so none of the dangers are actually present..

Feel free to have a look at my implementation (tested) which attempts to
mount root using supplied type first and if that fails falls back to the
classical "go through the list of all registered filesystems" method.

Thanks,
------
Tigran A. Aivazian | http://www.sco.com
Escalations Research Group | tel: +44-(0)1923-813796
Santa Cruz Operation Ltd | http://www.ocston.org/~tigran







-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:56    [from the cache]
©2003-2011 Jasper Spaans