lkml.org 
[lkml]   [1999]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Local loopback mounts (RFD)


On Mon, 31 May 1999, Jan Kasprzak wrote:

> Alexander Viro wrote:
> :
> : > I think the Linux dentry mechanism can allow us to have
> : > loopback mounts faster and more effective than NFS mount from 127.0.0.1. Note
> :
> : Yes, but the way you have proposed is broken.
> :
> : > The loopfs_read_super() just creates the root dentry and points
> : > its dentry->d_inode to the inode of the target directory. This has the
> : > advantage that both /some/directory and /another/directory works with
> : > same inodes, so file locks works properly, open(O_EXCL) works properly, etc.
> :
> : ... and one can trivially create loops in on-disk structure that way
> : (think of nasty games with rename()). We do need a way to compute the
> : foo-is-ancestor-of-bar relation.
> :
> Well, if I do it using mount(2) and a new FS type, only root can do
> it. And root is able to break the system anyway.


Yes, and as soon as root had created such mount everybody can screw the
things up under it. In other words, once done it opens ability to break
the system for everybody with write access to any directory in this tree.

To handle dentry-level aliases you need to keep the pointer to one of them
("primary") in the rest. Isolate methods calls (put them in exported
functions and make everybody use those functions instead of direct calls)
- partially done, but it needs to be finished. Make those functions
understand dentry stacks *and* deal with race conditions in accurate way.
It can be done, but it's non-trivial thing. Sigh...

As for another example of breakage: mount /foo/bar on /baz. Now, say
mv /baz/quux /baz/fred. Think what to do with dentry of /foo/bar/quux.



-
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/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.040 / U:1.624 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site