roland wrote:
> in linux, there is an option for this. :)
>   

And that doesn't mean that it is right for OpenSolaris. There are underlying
assumptions in both operating systems. What works in one may not work in
another.

> could you be more specific what code it would break or what would be so ugly 
> with this?
>
> iirc, when taking a look at the linux nfsd code, it was just a matter of 
> checking each subdir if it`s a mountpoint or not and then either creating 
> another share or just skip over.
>   

1) How do you detect the case that the server admin does not want to 
share a sub-filesystem?

What if we have:

/export/home rw
/export/projects/engr ro
/export/projects/acct rw

where both /export/projects/engr and /export/projects/acct are on the 
same filesystem.

And someone does
cd /export/home/thud
ln -s /export/projects/engr/nfsv41/kspe .

And so is /export/projects/engr/nfsv41.

Both /export/projects/engr and /export/projects/acct have the same FSID as
/export/projects/engr/nfsv41. We do:

client> mount server:/export/home /mnt
client> cd /mnt
client> cd thud
client> cd kspe

And there is no share on /export/projects/engr/kspe. Should we hand out 
a rw share at that point?

2) Lets say that the user did:

client> mount server:/export/projects/engr /mnt2
client> cd /mnt2/kspe
client> cd prototype

The server reboots now.

Which share applies when the client presents their cached FH?

The answer depends on whether or not this is NFSv3 or NFSv4.

The answer depends on whether or not the server embeds the share 
information in the FH.

Lets say it does embed the share information in the FH - that is an 
ephemeral share, it
is not persistent across reboots. Given the presence of hard and soft 
links, how does the
server determine which share point is the parent?

3) Can you get at cycles with either hard or soft links?

Both types of links are a pain to code for and you have to remember them 
when you
design. Converting from inode to parent (i.e., to determine pathname 
from a inode)
can be a hard problem. And in many ways, the scenarios I am describing above
are this problem.

4) Output from showmount -e will differ over time.

========

It is much simpler if we follow the rule that the server admin 
explicitly shares the
resources of the server. Either use inheritance to mimic what you want here
or manually set each share.


> so, would it really be so difficult or ugly to make this possible with 
> solaris nfsd, too?
>   


You can talk about whether it is an easy technical hack - sure.

But you also have to talk about what would the impact be on our quality, 
ease of maintaining
this code, interoperability with other parts of OpenSolaris, our 
security model, and what do
our users expect.



Reply via email to