On Mon, 24 Jul 2000, Pavel Machek wrote:

> Hi!
> 
> > I've been looking at the possibility of cleanly implementing virtual
> > files (podfuk/avfs style) with the multiple mount thing in 2.4
> > kernels. Here is how it would work:
> > 
> > 1) There needs to be a global lookup hook in VFS. If a real lookup
> > fails, the global lookup is invoked. The cached lookup path is not
> > effected.
> > 
> > 2) The global lookup checks whether the name refers to a virtual file
> > (contains the magic char & exists in /overlay). If it does, then the
> > file/dir from overlay is mounted on top of the negative dentry. The
> > dentry is not filled in, so the virtual file remains invisible.
> > 
> > For 1) the VFS needs to be modified, but with infinitesimal
> > performance effect. For 2) a kernel module could be used.

Erm? Negative lookup happens every time when you are creating an object.

> > Problems:
> > 
> >  - The filesystem will be littered with these loopback mounts. This
> >    should be cleared upon unmount, and possibly when the dcache is
> >    shrunk. There was a similar requirement for new autofs IIRC.

Not with the dcache shrinking.

> >  - Creation/removal of virtual files are not handled by this code.
> > 
> > Comments?

How will it interact with modifying the mount-tree?

Comment on autofs is pretty interesting, though. Sigh... Just let me find
some time to do mount-traps - that may very well be the right tool here...

Reply via email to