On Mon, May 14, 2001 at 11:21:00PM +0100, Alan Cox wrote:
>       You can make it a string if you like but at the end of the day 
>       has to be an opaque handle. For constant devices it also has to be
>       a constant name. Otherwise the /dev file I archived with the corporate
>       backup system turns out to be a different device when I restore the 
>       box after a problem and I reformat the wrong disk...

Why can't we configure this in user space? I think of something like
/etc/major-numbers. We could then tell the kernel at module load time what
major number to use for a given driver.

The corporate backup system then only needs to restore /dev and 
/etc/major-numbers at the same time. 

I don't think this is the ideal solution. But it has some nice
properties:

- no policy in kernel. Neither device names nor numbers are hard-coded
- no daemons needed, only some simple startup scripts 
- no special filesystems needed, /dev is simple tar-compatible directory
- everybody can add drivers to his system as he wants, without the need
  to register a number. One entry in a config file is enough
- every single system only needs as many major numbers as there are 
  drivers - so even 256 majors should be enough in most cases. 
  (this may be limited by the fact that the existing numbers should be
  recommended as standard entries in /etc/major-numbers to stay backward
  compatible)

Of course there are disadvantages, the biggest problem I see are drivers
compiled into the kernel. They need to get their major number from the
command line, I think, which is pretty ugly.

Perhaps the above is pure bullshit and my proposal is not working for
serveral reasons. But I think we should try to define our requirements to
the device numbering/naming system, and then find a solution that meats
these requirements - the final reason for choosing one solution should be
a technical one, not personal preference.

Jan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to