grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Autoloading WAS: normal/cmdline bug & patch


From: Yoshinori K. Okuji
Subject: Re: Autoloading WAS: normal/cmdline bug & patch
Date: Sat, 19 Jun 2004 17:05:00 +0200
User-agent: KMail/1.6.1

So there are three ways for this approach:

A. Load all modules at the start-up time.

B. Load modules until a module succeeds to recognize a filesystem.

C. Load an appropriate module using signatures or magic.


A is very simple, but it always consumes memory unnecessarily.

B is also simple enough, but it also may consume memory unnecessarily.

C is very efficient, but it makes things a bit complex, because one 
filesystem module must provide two different detection mechanisms.

I'd like to vote for B. I like this simplicity. How about these 
procedures? This is a modified version of B:

for each loaded filesystem module:
  try the filesystem with a specified partition/disk
  return if successful
for each non-loaded filesystem module:
  load the filesystem module
  try the filesystem
  return if successful
  unload the filesystem module

This is memory-efficient (unless the dynamic loader has memory 
leaks...), and this is slow only at the first attempt of the 
partition/disk.

I prefer this to C, because I've seen the command "mount" in GNU/Linux 
not maintained all the time very well. I guess this is because the 
author of code for a filesystem may not use "mount -t auto ..." with 
the filesystem. This would happen even in GRUB, since you wouldn't 
notice that the autoload of your filesystem module is broken, if you 
preload it in core or explicitly load it manually or in a config file.

Okuji




reply via email to

[Prev in Thread] Current Thread [Next in Thread]