[lkml]   [1999]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: UUIDs (and devfs and major/minor numbers)
    On Thu, 17 Jun 1999 wrote:
    [much useful argument, snipped]
    > The issue is not virtual FS versus some other kernel interface. The
    > issue is what appears in /dev, and whether the kernel code should be
    > hard coding what happears in /dev. It shouldn't. That's policy. The
    > kernel shouldn't be dictating policy.
    > Instead, the kernel should be exporting sufficient information so that a
    > user-mode daemon can provide whatever interesting naming scheme (and
    > that naming scheme might include device names based on the UUID or the
    > fslabel in the ext2 device, or something else far more general than what
    > kernel-space code can provide.)

    }begin heresy{

    In the interest of giving everybody a common enemy against which they can
    unite :-) I will submit that VMS has had this for a long time and arguably
    it works well. The kernel does pick a (simple) structure for names, a
    structure that does not please everyone but is at least consistent and
    fairly cheap. The kernel also provides a generator function,
    SYS$GETDVI(), which will produce one-by-one the names of all the tape
    devices, or all the disks on cluster node FOO, etc. It doesn't cover bus
    topologies IIRC but that could be easily added (and there were times when
    I could have used it). If you pass a complete device name to SYS$GETDVI()
    you can ask for all sorts of information about it, or you can get the name
    of the "next" device (that's why I call it a generator).

    The Linux kernel already provides a simple, cheap naming scheme for
    devices which is so generic that nobody ever uses it: (major, minor) .
    Given the availability of sufficient information from the kernel (a master
    list of all devices, detailed location and functional characteristics of
    each device) it wouldn't be too hard to write a library function to lookup
    devices by constraints such as bus, devicetype, sequential/random, or
    anything else you desire. devfs can do this sort of thing at the
    (arguably slight) cost of creating and maintaining a potentially large set
    of duplicate names for each device. But maybe a filesystem is the wrong
    way of looking at this problem. Maybe a database query is a more useful

    (Note to shell-scripters: the VMS "shell" includes a builtin function
    F$GETDVI() that exports SYS$GETDVI() functions into command scripts.
    There's no reason that a similar facility can't be written to wrap around
    a library function to do the same for your scripts.)

    (Note to VMS-heads: I know SYS$whatever is a syscall, not a library
    function. I figured that this community would prefer a library function
    to another syscall. There may be performance issues that will force the
    choice one way or the other.)

    }end heresy{

    Mark H. Wood, Lead System Programmer mwood@IUPUI.Edu
    Specializing in unusual perspectives for more than twenty years.

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:52    [W:0.044 / U:11.156 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site