Re: 2.3.51-52.pre1, shm and mounting somewhere else than /var/shm...

From: H. Peter Anvin (hpa@transmeta.com)
Date: Tue Mar 14 2000 - 14:41:25 EST


Followup to: <qww4sa97ssy.fsf@sap.com>
By author: Christoph Rohland <hans-christoph.rohland@sap.com>
In newsgroup: linux.dev.kernel
>
> "Albert D. Cahalan" <acahalan@cs.uml.edu> writes:
> > Documentation doesn't a feature make. It seems odd that the kernel
> > would not know where a filesystem is mounted. The kernel, more than
> > anything else, ought to be aware of filesystem mount points.
>
> My first version had this feature, but it was an ugly hack and I did
> not find a way to reliably export this to user space without further
> hacks.
>
> Unfortunately the fs does not get the mount point from anywhere. The
> only function called by the VFS ist read_super, which does not get the
> information. If you want to autodetect, you have to play tricks with
> dcache and the path to your root inode.
>
> > BTW, /var/shm is a bad default. Stuff like this should be right on
> > the root because /var may be a separate filesystem that gets mounted
> > after the system already needs shared memory.
>
> I am very open to proposals for other mount point defaults. But
> personally I really do not like any further root directory cluttering.
> Another idea would be /dev/shm like /dev/pts but I wanted to avoid
> clashes with devfs.
>

/dev/shm would be much more appropriate. It should be possible to
mount on top of devfs just like any other filesystem, although devfs
of course needs to make the mount point appropriately.

/dev in fact would probably be the correct location these things,
being a kernel interface.

HOWEVER, sometimes avoiding "root directory cluttering" seems to be a
little too much of a goal in itself. Sometimes adding items at the
root is entirely appropriate.

        -hpa

-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."

- 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 : Wed Mar 15 2000 - 21:00:28 EST