From: Al Viro <viro@ZenIV.linux.org.uk>
To: Joerg Schilling <schily@schily.net>
Cc: otnaccess@hotmail.com, linux-fsdevel@vger.kernel.org,
joerg@schily.net, jack@suse.cz
Subject: Re: FW: Symbolic link with absolute target path in UDF - not working properly?
Date: Wed, 14 Dec 2011 00:45:03 +0000 [thread overview]
Message-ID: <20111214004503.GK2203@ZenIV.linux.org.uk> (raw)
In-Reply-To: <4ee7d490.dvuacxTYdtBRcPEP%schily@schily.net>
On Tue, Dec 13, 2011 at 11:41:20PM +0100, Joerg Schilling wrote:
> lofs has been introduced with NSE, the first project oriented revision control
> system (based on SCCS). lofs at that time was used to create chrooted tailored
> environments and of course, symlinks are important in such environments.
>
> Absolute symlinks in such an environment either point to a local equivalent or
> they do not point to anything. Both is accepted behavior as this does not
> differ from the non-chrooted case.
>
> Relative symlinks that point outside the chrooted environment are evaluated
> according to the rules for symlinks and for the root directory.
>
> I see no can of worms here.
What happens when you chroot into a _subtree_ of that lofs? How would
that kind of symlink look like to readlink(2) and what would following
it do to you?
> Let me look at the "binding"... I cannot see any advantage compared to loopback
> mounts. Do you know such an advantage?
Why, yes - I do. A bunch of those.
* lack of coherency issues; we don't get to deal with separate set
of vnodes as Solaris does.
* our variant is actually lighter, both in terms of memory
consumption and in runtime overhead.
* it's conceptually simpler - there is (as in any Unix) a forest of
directory trees (one for each active fs) and there is a mount tree that
glues a unified namespace out of their pieces. Each node in that tree bears
an arbitrary subtree of some active fs. mount --bind simply creates a new
mount node refering to subtree rooted at given directory (or a non-directory,
while we are at it, in which case we want the mountpoint to be a non-directory
as well).
* it plays well with namespaces - just make the mount tree
a property of process, just as the descriptor table, cwd/root, address
space, etc., with the only difference being that fork(2) shares that
one instead of copying; clone(2) does allow creating a copy (so does
unshare(2)). That's a lot cleaner than chroot, BTW, and being able
to put a part of fs into such environment without plopping the whole
tree into it is very convenient.
> point related symlinks. Given the fact that the Rock Ridge filesystem is older
> than Linux and that RR introduced mount point related absolute symlinks, isn't
> this bind mount something that could have been avoided?
>
> Well, I have to admit that Solaris does not implement mount point related
> absolute paths in symlinks with Rock Ridge even though it could be done.
> Seems like I should write than code ;-)
Seems like somebody in Sun had enough taste to say "no, thanks" to that kind
of kludge, actually, but don't let that stop you - not our kernel, not our
headache and all such...
FWIW, mount --bind is loosely based on Plan 9 bind(8). There are differences
in semantics (their variant leads to possibility of infinite mount trees,
which is _not_ something gracefully dealt with by existing Unix codebase)
and implementation differs as well, but the basic idea comes from there.
next prev parent reply other threads:[~2011-12-14 0:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <SNT126-DS19FDA9F050C2D5E43731CDBEB40@phx.gbl>
2011-12-07 18:06 ` FW: Symbolic link with absolute target path in UDF - not working properly? Jan Kara
[not found] ` <SNT126-DS1C6361C26AD146EBA3BB6BEBE0@phx.gbl>
2011-12-12 14:18 ` Jan Kara
[not found] ` <SNT126-DS114F372B3DA7DF425B8146BEBC0@phx.gbl>
2011-12-13 11:01 ` Joerg Schilling
2011-12-13 16:13 ` Jan Kara
2011-12-13 18:30 ` Joerg Schilling
2011-12-13 19:25 ` Jan Kara
2011-12-13 19:54 ` Joerg Schilling
2011-12-13 20:26 ` Al Viro
2011-12-13 22:41 ` Joerg Schilling
2011-12-14 0:45 ` Al Viro [this message]
2011-12-14 17:34 ` Joerg Schilling
2011-12-13 20:05 ` Al Viro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111214004503.GK2203@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=jack@suse.cz \
--cc=joerg@schily.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=otnaccess@hotmail.com \
--cc=schily@schily.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).