[RFC,PATCH 0/4] Dynamic Pseudo Root
Steve Dickson
SteveD at redhat.com
Mon Dec 10 08:50:00 EST 2007
Brent Callaghan wrote:
> 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.
I kinda like the approach of building the in-kernel export cache
as the exports are accessed. Why pump ton of data into the kernel
that may or may not be used?
>
>>>
>>> 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.
I see your point and I'm not sure how well something like this would
map into Linux kernel, but one advantage of the current approach was
there was no kernel changes. The whole pseudo root concept was a
userlevel thing. The kernel knew nothing about it, which that may or
may not be a good thing... unclear at this point...
>
>>> 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.
Ah... thats were the simplicity and straightforwardness comes from.
There is no concept of a pseudo root; Its all one big namespace.
Supporting multiple namespaces does add complicity and possible
confusion but they can be useful as Bruce pointed out. But this point we
have no choice but to keep supporting multiple namespaces, which means,
I guess, the Linux server will always be a bit more complicated.
steved.
More information about the NFSv4
mailing list