[RFC,PATCH 0/4] Dynamic Pseudo Root

J. Bruce Fields bfields at fieldses.org
Fri Dec 7 19:05:00 EST 2007


On Fri, Dec 07, 2007 at 02:57:58PM -0800, Brent Callaghan wrote:
> 
> This seems like a very complicated way to implement a pseudo root.
> 
> 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:
> 	
> 	o LOOKUPs succeed only for path components that lead to
> 	   exported filesystems.
> 
> 	o READDIR shows only path components that lead to exported
> 	   filesystems.
> 
> The pseudo filesystem is the same as the real filesystem, with
> some restrictions.
> 
> The code to implement this was pretty straightforward.

You may be right.

The kernel currently doesn't currently get the whole export table on
startup--it just learns bits an pieces of it as new clients make
requests.  To make an in-kernel solution work (especially for READDIR),
we obviously need to change that.  I really hate changing kernel
interfaces, hence the attraction of doing the whole thing in userspace,
at least as a prototype.

But maybe there's a way we could make this all work with no or minimal
changes to the export interface.  At a minimum I assume the kernel would
have to stop looking up the dentry for each new export it learns about,
as that would require mounting every exported filesystem on nfsd
startup.  That seems like a potential scalability and start-up time
problem.

If we go with an in-kernel solution, are there any advantages to using
the real filesystem(s) over cooking up a fake in-kernel filesystem?

--b.


More information about the NFSv4 mailing list