2002-10-03 15:05:15

by Michael Clark

[permalink] [raw]
Subject: Re: [Evms-devel] Re: [PATCH] EVMS core 2/4: evms.h


>>+#define DEV_PATH "/dev"
>>+#define EVMS_DIR_NAME "evms"
>>+#define EVMS_DEV_NAME "block_device"
>>+#define EVMS_DEV_NODE_PATH DEV_PATH "/" EVMS_DIR_NAME "/"
>>+#define EVMS_DEVICE_NAME DEV_PATH "/" EVMS_DIR_NAME "/" EVMS_DEV_NAME
>
>
> The kernel doesn't know about device names at all.

It does for specifying root devices and for devfs.


2002-10-03 15:09:14

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [Evms-devel] Re: [PATCH] EVMS core 2/4: evms.h

On Thu, Oct 03, 2002 at 11:10:14PM +0800, Michael Clark wrote:
>
> >>+#define DEV_PATH "/dev"
> >>+#define EVMS_DIR_NAME "evms"
> >>+#define EVMS_DEV_NAME "block_device"
> >>+#define EVMS_DEV_NODE_PATH DEV_PATH "/" EVMS_DIR_NAME "/"
> >>+#define EVMS_DEVICE_NAME DEV_PATH "/" EVMS_DIR_NAME "/" EVMS_DEV_NAME
> >
> >
> > The kernel doesn't know about device names at all.
>
> It does for specifying root devices and for devfs.A

root device should be in do_mount.c and not in obscure headers.
devfs doesn'T need hardcoded "/dev" prefixes, and it's better to not
add defines for the strings in devfs so that crap doesn't get spread
over the code but is localized to the existing devfs damage

2002-10-03 16:15:56

by Linus Torvalds

[permalink] [raw]
Subject: Re: [Evms-devel] Re: [PATCH] EVMS core 2/4: evms.h


On Thu, 3 Oct 2002, Christoph Hellwig wrote:
>
> root device should be in do_mount.c and not in obscure headers.

No, they should _not_ be in do_mount.c either. They should be in the
driver registration, and do_mount.c should not have a random list of
devices.

I'm not accepting do_mount.c expansion here, simply because I don't want
to help a horribly broken interface. You can always use a hex number
(which is what things like lilo will install anyway, I believe, rather
than using the "root=/dev/xxx" command line), and if people get too tired
about remembering numbers, maybe somebody who cares will step up to the
plate and write a reverse of "__bdevname()" and do it right.

Hint: see __bdevname in fs/block_dev.c, and realize that it does the
"kdev->name" translation without _any_ tables at all. Think about doing
the same the other way, by just walking the registered block devices.

Linus