Attached come a couple of ideas which came to my mind last
night. As I don't follow lkml too closely, they may be obsolete; if
that is the case I apologize.
If I get some positive comments and manage to allocate some
time, I may try to implement something myself.
ranty
PS: please write to me directly as I am not in the list.
-------------------------------------------------
Manuel Estrada
Ranty@atdot.org
-------------------------------------------------
Proposed model of the problem:
KCI = Kernel Canonical Identifier
currently mayor and minor device number pairs
USN = UserSpace Name
currently the name of the device file
As I see it, DEVFS changes the KCI from a pair of numbers into a path
like string.
And at least without devfsd, it makes user programs use KCIs directly,
which could be seen as currently having to use device major and minor numbers
directly. Stablishing policy in the kernel.
Posible solutions:
1) Similar to the current schema both old KCIs (device numbers) and new
KCIs (strings) could be stored in the inode and still let the name of
the device be the USN. And in a DEVFS capable kernel they would
behave like a "symlink into DEVFS whereever it may be mounted or not".
This doesn`t make DEVFS any more optional than it is now as some
want but it does make it work like the traditional way which may be
good enogh. And hopefully it could be acomplished without breaking
compatibility with non DEVFS aware kernels.
2) Is a little bit more complicated, I propose two more concepts:
USDN=UserSpace Default Name
compile time defined, easly modifiable in a single file
and distro dependant. And by default would be the same
as the KCI.
USVN=UserSpace deVfsd Name
resolved at runtime asking devfsd if it is available and
wants to resolve it.
In this one, the mapping between KCIs and USNs would work in the
following way:
USN = "is USVN available" ? USVN : USDN;
This would allow for easy changing kernel imposed policy without
devfsd while maintaining all devfs flexibility.
Also to improve frexibility, whatever data structure maps KCIs into
USDNs could be loaded as a module or even modifiable at runtime with
some ioctl or something.
Also with some mount time flag KCIs would be used directly for easier
inter-distro compatibility, to be mounted in something like /devfs/
then:
/dev/ would be distro dependent
/devfs/ would be distro independant (kernel dependent)
-
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/
This archive was generated by hypermail 2b29 : Sun Apr 23 2000 - 21:00:22 EST