Re: knfsd and submounts

Matthew Wilcox (Matthew.Wilcox@genedata.com)
Mon, 28 Jun 1999 13:33:07 +0200


On Fri, Jun 25, 1999 at 11:48:03AM -0500, Matthew Vanecek wrote:
> > > Emulate Sun NFS daemon
> > > CONFIG_NFSD_SUN
> > > If you would like for the server to allow clients to access
> > > directories that are mount points on the local filesystem (this is
> > > how nfsd behaves on Sun systems), say yes here. If unsure, say N.

> Plainly, the CONFIG_NFSD_SUN does something other than what the
> Configure.help says it does. I'm not sure what, but it *doesn't* allow
> submounts to be viewed as part of the total exported filesystem; only
> the physical partition is exported, and not any of the other partitions
> mounted on the exported partition (I know, we export directories, by for
> clarity's sake...)

That isn't what the Configure.help entry claims to do though. Let me
illustrate:

On the server we have two filesystems, / and /usr. On the / filesystem,
we have a /usr directory which has a file `foo' in it. But the /usr
filesystem is mounted on top of the directory which contains foo, so on
the server one sees the contents of the /usr filesystem, which does not
include the file `foo'. The question is, when one exports /, does one
get to see /usr/foo or not? And that is what CONFIG_NFSD_SUN decides.
The only place this is mentioned is in fs/nfsd/vfs.c:

#ifndef CONFIG_NFSD_SUN
if (dentry->d_mounts != dentry) {
return nfserr_perm;
}
#endif

That is, the behavior with CONFIG_NFSD_SUN set to No is to check
if this is a mountpoint and if it is, return a permission error.
If CONFIG_NFSD_SUN is turned on, one can see `under' a mount point on
the server.

Would someone care to knock up a better description for this config
option and submit it as a patch to Linus? The current text is evidently
confusing.

-- 
Matthew Wilcox <willy@bofh.ai>
"Windows and MacOS are products, contrived by engineers in the service of
specific companies. Unix, by contrast, is not so much a product as it is a
painstakingly compiled oral history of the hacker subculture." - N Stephenson

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