From owner-freebsd-fs@FreeBSD.ORG Mon Apr 6 10:38:43 2009 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B79010656CF for ; Mon, 6 Apr 2009 10:38:43 +0000 (UTC) (envelope-from dfr@rabson.org) Received: from itchy.rabson.org (router.rabson.org [80.177.232.241]) by mx1.freebsd.org (Postfix) with ESMTP id 043C18FC13 for ; Mon, 6 Apr 2009 10:38:42 +0000 (UTC) (envelope-from dfr@rabson.org) Received: from [IPv6:2001:470:909f:1:21b:63ff:feb8:5abc] (unknown [IPv6:2001:470:909f:1:21b:63ff:feb8:5abc]) by itchy.rabson.org (Postfix) with ESMTP id A43385CEE; Mon, 6 Apr 2009 11:22:40 +0100 (BST) Message-Id: <74607C8A-226C-47FB-BFA5-E99AF535AD01@rabson.org> From: Doug Rabson To: Rick Macklem In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Mon, 6 Apr 2009 11:15:04 +0100 References: X-Mailer: Apple Mail (2.930.3) Cc: freebsd-fs@freebsd.org Subject: Re: nfsv4 sharing nfssvc() with the regular nfsd X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2009 10:38:43 -0000 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.