[RFC,PATCH 0/4] Dynamic Pseudo Root
Brent Callaghan
brentc at apple.com
Sat Dec 8 12:13:56 EST 2007
On Dec 8, 2007, at 6:36 AM, Steve Dickson wrote:
>
>>
>> Why not implement it the same way as Solaris does it ?
>>
>> When a Solaris NFSv4 server gets a PUTROOTFH it returns the client
>> the real filehandle for the real system root. In fact, all
>> filesystems that
>> may provide a path to a real export are automatically exported,
>> albeit
>> with some simple restrictions:
> So can I assume that Solaris does pump all the exports to a table
> in the kernel?
Yes, BSD and MacOSX do it that way too. Though I can also see some
advantages in having exports discovered on the fly.
>
>>
>> o LOOKUPs succeed only for path components that lead to
>> exported filesystems.
>>
>> o READDIR shows only path components that lead to exported
>> filesystems.
> With the mapping approach, the LOOKUPS and READDIRS automagically
> return the correct components because only the exported components
> exist in the root. Meaning no changes (i.e. checks) are needed
> in the actual server code.
I'm not familiar with the Linux export implementation, but it seems like
you could do it a similar way - just set up these "transit only" exports
that behave like real exports - but with limited visibility. One subtle
advantage is that the client gets real filehandles for these
filesystems,
so that if you change your mind later and actually export one, the
client sees no change in the filehandles or attributes.
>
>>
>> The pseudo filesystem is the same as the real filesystem, with
>> some restrictions.
> Does Solaris have some type of mechanism that allows the pseudo
> filesystem something other than the real root?
No - that seemed confusing. The intent was to make the NFSv4 exported
namespace identical to that for NFS v2 and v3, and the same as what
the user would see if logged in.
>>
>> The code to implement this was pretty straightforward.
> Being straightforward.... is *always* a good thing... :-)
Aye :-)
Brent
More information about the NFSv4
mailing list