nfsv4 sharing nfssvc() with the regular nfsd

Doug Rabson dfr at rabson.org
Mon Apr 6 03:38:43 PDT 2009


On 2 Apr 2009, at 23:01, Rick Macklem wrote:

> For nfsv4 to live side-by-side with the regular nfsd, they must either
> share the nfssvc() system call or a new one must be allocated for  
> nfsv4.
>
> As such, I've cobbled some code to-gether to allow the nfssvc()  
> syscall
> to be shared. It basically consists of a small module called nfssvc  
> with
> only the nfssvc() syscall function in it, where nfsserver and nfsv4
> "register" with it by setting the appropriate function pointer non- 
> null. These functions are then called, based on the NFSSVC_xxx flag  
> value. (I've coalesced the NFSSVC_xxx flags into a separate .h file,  
> to avoid confusion.)

This sounds about right.

>
> I also deleted the following, since I believe that it is just cruft.
> (sysproto.h is included in all of these files.)
> #ifndef _SYS_SYSPROTO_H_
> struct nfssvc_args {
> 	int flag;
> 	caddr_t argp;
> };
> #endif
> Is there a reason for the above?

I can't think of one so I'm going to go with 'historical reasons',

>
>
> I've attached the "diff -u" in case anyone would be willing to
> review it, rick.

The patch looks ok. The only thing I would change is to change the  
names of the various call_foo variables so that they start with "nfs_"  
for consistency.



More information about the freebsd-fs mailing list