H. Peter Anvin writes:
> > 
> > It's been proposed that an alternative solution is to populate a
> > directory with a direct map with symlinks. Unfortunately, that looks a
> > little ugly, and <ls -lF /> would cause them all to be mounted, which
> > is not desirable, I presume.
> 
> This is a general problem with direct mounts anyway.
> 
> The technical issue is that the Linux VFS doesn't support "sandwich
> mounts", i.e. mounting a filesystem on top of the root of another
> filesystem (in the case of a direct mount, the sandwiched filesystem
> would be autofs, of course.)  (Incidentally, we *know* this is what
> Solaris uses.)

I don't understand how sandwich mounts come into the discussion, at
least not when using the fakes I was talking about. What am I missing?

I suppose you're referring to the normal way the automounter works,
which is to mount an autofs on top of a mount point, and then have
submount points under that. But I don't understand why you *need* to
mount an autofs with the scheme I outlined.

> Sandwich mounts would eliminate an important optimization in the
> VFS, and we don't want that (after all, the Linux filesystem is
> probably the fastest one on the market, and we *want* that!)

Absolutely. When you have a system that is so fast that it *feels*
faster almost immediately after logging in (cf. Solaris), you know
you've got something good.

> However, you bring up a perfectly valid point, and one which I
> hadn't really considered: it may be possible to use the dentry
> system to trapdoor a directory without making it a proper mount.

Ah. So you're actually considering adding an optional lookup method to
dentries? I discarded that idea because it would add an extra test to
each lookup (at each level).

> This is definitely v2.3 stuff and means autofs-specific hooks in the
> VFS, but if it can be done cleanly enough Linus just might let me do
> it.  Now you've given me something to think about.  I can't say
> offhand if this is doable, but I can't say offhand that it *isn't*,
> either...

OK. But could you please explain why the fake idea is no good? I like
it (despite a certain ugliness to it) because it doesn't slow down
cached dentry lookups *at all*.

> Thanks for adding some technical content to this particular issue,
> which was starting to degenerate into a few people thinking that if
> they just whined loudly enough they would get their way...

Thanks. I guess I managed to see both sides of the argument. I use
autofs in an environment where we have NIS mount maps from Solaris
boxes, and I had to hack the startup script to ignore direct maps. It
would be good to support them. It's not essential to me, but I can see
how it is for others. On the other hand, performance matters a lot to
me (it's a wonderful selling point too), so I figured we needed a way
out of the impasse.

I've done my best work when arguing with someone (wanting some or
other feature) just as stubborn as me :-) Eventually, an approach pops
out that gives them what they need but doesn't compromise my design.
Sigh. Those were good days.

                                Regards,

                                        Richard....

Reply via email to