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

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
that symlinks are not generally usable for this purpose: for example
in chrooted environments where you want to have the same directory
available in multiple such sub-trees.

I have been thinking about it a bit and I have created a simple
filesystem loopfs, in which you can do

# mkdir /some/directory /another/directory
# mount -t loopfs /some/directory /another/directory
# mkdir /some/directory/penguins
# touch /another/directory/penguins/tux
# ls /some/directory/penguins
tux
#

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.

I want to ask you whether the new pseudo-filesystem is the right
interface to have. Or should we do someting completely different (e.g. extend
ext2fs to support non-tree topology, or do the same thing at the VFS layer,
but not using mountpoints. What do you think about it?

-Yenya

--
\ Jan "Yenya" Kasprzak <kas at fi.muni.cz> http://www.fi.muni.cz/~kas/
\\ PGP: finger kas at aisa.fi.muni.cz 0D99A7FB206605D7 8B35FCDE05B18A5E //
\\\ Czech Linux Homepage: http://www.linux.cz/ ///
/// While Linux is larger than Emacs, at least Linux has the excuse \\\
// that it needs to be. --Linus Torvalds \\

-
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.066 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site