Re: knfsd and submounts

Riley Williams (rhw@MemAlpha.CX)
Tue, 29 Jun 1999 01:38:35 +0100 (GMT)


This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.

--1421910094-79344649-930616715=:26697
Content-Type: TEXT/PLAIN; charset=US-ASCII

Hi Matthew.

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

I have to admit thaat I was under the saame misunderstanding
regaarding thaat option...

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

Perhaps I can suggest the enclosed patch - if you like it, you can
forward it to Linus...

Best wishes from Riley.

+----------------------------------------------------------------------+
| There is something frustrating about the quality and speed of Linux |
| development, ie., the quality is too high and the speed is too high, |
| in other words, I can implement this XXXX feature, but I bet someone |
| else has already done so and is just about to release their patch. |
+----------------------------------------------------------------------+
* ftp://ftp.MemAlpha.cx/pub/rhw/Linux
* http://www.MemAlpha.cx/kernel.versions.html

--1421910094-79344649-930616715=:26697
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="nfs-sun-help.diff"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.10.9906290138350.26697@ps.cus.umist.ac.uk>
Content-Description:
Content-Disposition: attachment; filename="nfs-sun-help.diff"

LS0tIENvbmZpZ3VyZS5oZWxwfglNb24gSnVuIDE0IDAzOjU0OjA2IDE5OTkN
CisrKyBDb25maWd1cmUuaGVscAlUdWUgSnVuIDI5IDAxOjMyOjQyIDE5OTkN
CkBAIC03MTYzLDkgKzcxNjMsMjEgQEANCiANCiBFbXVsYXRlIFN1biBORlMg
ZGFlbW9uDQogQ09ORklHX05GU0RfU1VODQotICBJZiB5b3Ugd291bGQgbGlr
ZSBmb3IgdGhlIHNlcnZlciB0byBhbGxvdyBjbGllbnRzIHRvIGFjY2Vzcw0K
LSAgZGlyZWN0b3JpZXMgdGhhdCBhcmUgbW91bnQgcG9pbnRzIG9uIHRoZSBs
b2NhbCBmaWxlc3lzdGVtICh0aGlzIGlzDQotICBob3cgbmZzZCBiZWhhdmVz
IG9uIFN1biBzeXN0ZW1zKSwgc2F5IHllcyBoZXJlLiBJZiB1bnN1cmUsIHNh
eSBOLg0KKyAgSWYgeW91IHNheSBZIGhlcmUsIHRoZW4gd2hlbiB0aGlzIHN5
c3RlbSBpcyB1c2VkIGFzIGFuIE5GUyBzZXJ2ZXIsDQorICB0aGUgYmVoYXZp
b3VyIG9mIG5mc2Qgb24gU3VuIHN5c3RlbXMgd2lsbCBiZSBlbXVsYXRlZC4g
SWYgeW91IHNheQ0KKyAgTiBoZXJlLCB0aGVuIGEgY2xlYW5lciAoYW5kIHBv
dGVudGlhbGx5IG1vcmUgc2VjdXJlKSBiZWhhdmlvdXJhbA0KKyAgc3R5bGUg
d2lsbCBiZSB1c2VkLiBJZiB1bnN1cmUsIHNheSBOLg0KKw0KKyAgVG8gY2xh
cmlmeSB0aGUgYmVoYXZpb3VyIG9mIFN1biBzeXN0ZW1zIGluIHRoaXMgcmVz
cGVjdCwgaW1hZ2luZSBhDQorICBzeXN0ZW0gd2hlcmUgdGhlIC9ob21lL2Z0
cCBwYXJ0aXRpb24gaGFzIGEgc3ViZGlyZWN0b3J5IHB1YiB3aXRoIGENCisg
IGZpbGUgaW4gaXQgY2FsbGVkIHB1Yi8ubWVzc2FnZSBhbmQgd2hlcmUgYSBz
ZWNvbmQgcGFydGl0aW9uIGhhcw0KKyAgYmVlbiBtdW50ZWQgb3ZlciAvaG9t
ZS9mdHAvcHViIGFuZCBoYXMgdGh1cyBoaWRkZW4gdGhlIHB1Yi8ubWVzc2Fn
ZQ0KKyAgZmlsZS4NCisNCisgIFdpdGggdGhlIFN1biBzeXN0ZW1zIGJlaGF2
aW91ciwgdGhhdCBoaWRkZW4gcHViLy5tZXNzYWdlIGZpbGUgd2lsbA0KKyAg
YmUgdmlzaWJsZSB0byBORlMgY2xpZW50cyB0aGF0IG1vdW50IHRoZSAvaG9t
ZS9mdHAgcGFydGl0aW9uIGZyb20NCisgIHlvdXIgc2VydmVyLCBVTkxFU1Mg
dGhleSBhbHNvIG1vdW50IHRoZSAvaG9tZS9mdHAvcHViIHBhcnRpdGlvbiBv
bg0KKyAgdG9wIG9mIGl0Lg0KIA0KIE9TLzIgSFBGUyBmaWxlc3lzdGVtIHN1
cHBvcnQgKHJlYWQgb25seSkNCiBDT05GSUdfSFBGU19GUw0K
--1421910094-79344649-930616715=:26697--

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