Re: multimounting cdroms ???

From: H. Peter Anvin (hpa@transmeta.com)
Date: Fri Jul 28 2000 - 18:47:44 EST


Alexander Viro wrote:
>
> On Sat, 29 Jul 2000, Marcus Meissner wrote:
>
> > Please do it right and use something like a directory per mount:
> >
> > /proc/xmounts/<nr>/
> > mountpoint (file with content of the mount target
> > directory)
> > device (whatever is in the device value)
> > fstype (you get the drift)
> > options
> > ...
> >
> > Iterate <nr> for all mounts.
> >
> > Most clean way, easy to parse, unambigous.
>
> ... and ugly enough to make one barf. WTF is "device"? Makes no sense for
> procfs, for NFS, as the matter of fact for most of filesystems.

It's nonapplicable for nodev filesystems, but there is still a
device-dependent string placeholder, which has some meaning for some
filesystems -- e.g. NFS, smbfs or autofs. Of course, for device
filesystems, it might be nice to have this one actually be a symlink to
the device dentry in use, that would obviously

> How would
> you like your "options", sliced or in one piece? Why?

In one piece, because that is what you would pass to mount(2).

> WTF is "/proc/xmounts"? If it's an fs of its own - don't put it under procfs. Yodda, yodda..

This is pretty much the idea behind /proc/sys and the sysctl structure
-- one data item per file entry. It is easy to browse automatically,
allows simple tools (e.g. shell scripts) to access it, can be trivially
turned into SNMP MIBs, isn't subject to stomping all over kernel memory
which some proc files is want to do, and most of all, won't be
continually messed around with like some people seems to want to do with
/proc files all the fscking time.

It would belong better under /proc/sys/fs/mounts than anything else,
though.

> Now, what's wrong with having 1 (.o.n.e.) text file instead of all that
> hierarchy? \0 can't happen inside the names, so we can trivially use it
> for separator. Dunno about you, but I _hate_ this braindamage with
> replacing plain files with a metric buttload of little cute one-line
> turdlets. And here you don't even have a pseudo-excuse that tends to be
> uttered when it is done to something like /etc/inetd.conf (lusers who
> package k3WlcR4pIRCd and can't be arsed to learn sed(1) or use the
> standard script that should be provided by distribution). IOW, __please__
> don't do that.

See above.

        -hpa

-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt

- 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 : Mon Jul 31 2000 - 21:00:28 EST