Linus Torvalds <torvalds@linux-foundation.org> wrote:That helps one case, yes, but what about a superset? What about two sets that might intersect but for which you don't have the common root to hand? The current NFS code deals with all these problems by attempting to share the dentry sets. Superblocks can now have multiple roots and we graft trees together automatically when we discover one is a subset of another. The case I came up with was this: mount home:/home/fred /home/fred mount home:/home/jim /home/jim To effect these, the NFS mount process looks up "/home/fred" or "/home/jim" directly rather than looking up "/" and path walking. However, the NFS client in the kernel may note that both Fred's and Jim's home directories reside on the same NFS volume. You cannot use a bind mount here because there's nothing to bind from. Then, should, say, this happen: mount home:/home /mnt You'll probably end up with three roots in the NFS superblock. Following with an ls of /home, say, would then populate the dentries for /home - including those for fred and jim, and the code would splice in the dentried now rooted at /home/fred and /home/jim. You can't do that with bind mounts as far as I know because I don't believe that you can go up the tree (rootwards) from the apparent root of a vfsmount. So bind mounts aren't quite it for this problem, and in any case your suggestion of: mount --bind /some/nfs/mount/subdir /new/mount/place doesn't help with the automounter case particularly well. The automounter *could* probe to see if the server stuff is common with an already existing mount, but there would then be a race, and it doesn't help with the homedir example I gave above either. You might think "well, start by mounting '/' somewhere and then bind mounting subdirs of it", but that doesn't work if you can't mount "/" or "/home", and might go spectacularly wrong if the server has a symlink in the path that you can't see. Yeah, that's probably necessary, if annoying. However, local caching can enable sharing or make it a prerequisite option. The reason I added all this NFS superblock sharing is so that I could implement on-disk local caching much more easily. If, for instance, two netfs inodes aren't shared, but their "index keys" say they should use the same piece of cache then all sorts of fun ensues from the disjoint cache coherency. Even working out that two inodes are using the same piece of cache isn't trivial (though it seems like it ought to be). David -
| Eric Paris | [RFC 0/5] [TALPA] Intro to a linux interface for on access scanning |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Chris Mason | Btrfs v0.16 released |
git: | |
| Michael Hendricks | removing content from git history |
| Jakub Narebski | Re: VCS comparison table |
| Ken Pratt | pack operation is thrashing my server |
| Aubrey Li | git proxy issue |
| Kevin Neff | Patching a SSH 'Weakness' |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Theo de Raadt | Re: dmesg IBM x3650 OpenBSD 4.3 |
| F. Caulier | [Perl/locales] Warning about locales |
| KOSAKI Motohiro | [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| Jens Axboe | Re: [BUG] New Kernel Bugs |
| Rémi | [PATCH 0/6] [RFC] Phonet pipes protocol (v2) |
| Oliver Hartkopp | Re: [RFC] Patch to option HSO driver to the kernel |
| Treason Uncloaked | 1 hour ago | Linux kernel |
| Shared swap partition | 13 hours ago | Linux general |
| high memory | 2 days ago | Linux kernel |
| semaphore access speed | 2 days ago | Applications and Utilities |
| the kernel how to power off the machine | 2 days ago | Linux kernel |
| Easter Eggs in windows XP | 2 days ago | Windows |
| Root password | 2 days ago | Linux general |
| Where/when DNOTIFY is used? | 2 days ago | Linux kernel |
| How to convert Linux Kernel built-in module into a loadable module | 2 days ago | Linux kernel |
| Linux 2.6.24 and I/O schedulers | 2 days ago | Linux kernel |
