Re: Should mount --bind not follow symlinks?

Kai Henningsen (kaih@khms.westfalen.de)
16 Apr 2001 17:37:00 +0200


viro@math.psu.edu (Alexander Viro) wrote on 12.03.01 in <Pine.GSO.4.21.0103120835390.25792-100000@weyl.math.psu.edu>:

> On Mon, 12 Mar 2001, Anthony Heading wrote:
>
> > Hi,
> > My automounted dirs have up till now been symlinks, where
> > e.g. /opt/perl defaults to automounting /export/opt/perl/LATEST
> > which is a symlink.
> >
> > This all worked OK until the 2.4(.2) automounter helpfully tries
> > to mount --bind /export/opt/perl/LATEST /opt/perl
>
> Don't mix symlinks with mounts/bindings. Too much PITA and yes, it had
> been deliberately prohibited. You _really_ don't want to handle the
> broken symlinks and all the realted fun - race-ridden at extreme and
> useless.

Race? Where? You resolve the symlink once and operate on the result. No
need to remember anywhere that it ever was a symlink. If there *can* be a
race, this sounds like a serious design bug.

This looks like it *seriously* breaks my current 2.2 setup: I have dirs
with sensible names under /Partition, and symlinks to those dirs whose
name is the UUID for mount to use. Nothing automount in here. (And of
course all those links and directories are completely static and only root-
modifiable anyway, this only changes when I repartition.)

MfG Kai
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/