Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Oct 2012 14:40:02 GMT
From:      Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
To:        freebsd-fs@FreeBSD.org
Subject:   Re: kern/136865: [nfs] [patch] NFS exports atomic and on-the-fly atomic updates
Message-ID:  <201210221440.q9MEe2qi065456@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/136865; it has been noted by GNATS.

From: Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
To: Martin Birgmeier <Martin.Birgmeier@aon.at>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/136865: [nfs] [patch] NFS exports atomic and on-the-fly
 atomic updates
Date: Mon, 22 Oct 2012 17:35:52 +0300

 On Sat, Oct 20, 2012 at 11:43:17AM +0200, Martin Birgmeier wrote:
 > Andrey,
 > 
 > I'd really like to use this. However, I need to use it with FreeBSD 7.4,
 > 8.2, and 9.0 (and 9.1 in the near future); I tried to backport your
 > changes, but this turned out to be too difficult for me.
 
 The nfse utility could be built on 8.x, 9.x and 10.x.  To build nfse on 7.x
 it is necessary to copy <sys/queue.h> with LIST_SWAP() macro definition.
 
 The semantics of the getgroupslist(3) was changed in 8.x and 9.x, so it is
 required to use -mapall and -maproot with list of groups (-mapall=user:group)
 on 7.x, otherwise nfse will report about duplicated groups for "-mapall=user".
 
 The src/sys.diff changes are more complex.  First of all NFSv4 support
 and sys/fs/nfs* were added in 8.0 and some parts in sys/nfs* were changed.
 Having checked difference between 7.x and 8.x-10.x in NFS related parts,
 I think it will require to rewrite all changes from sys.diff to support 7.x.
 
 Right now it is possible to apply sys.diff to RELENG_9, only one simple
 change will be rejected.  I applied sys.diff to 8.2 and there are several
 rejected files, I made sys.diff for 8.2 and sent it to you in a private
 message (it can be built, but I did not run it).  I did not make changes
 for cddl/ from 8.2, this is not necessary.  Modification of etc/ is not
 complex.
 
 > 
 > I believe your work could be more easily adopted (even into the core
 > FreeBSD sources) provided that
 >   - patches for all supported branches of FreeBSD were available and
 
 I used to think that major changes should go to the CURRENT and only
 then be MFCed to other releases if necessary.
 
 >   - there existed a simple knob in rc.conf where one switches between
 > the old mountd and the new nfse
 
 It works like this.  Set mountd_enable="NO" and set nfse_enable="YES",
 if compatibility mode with exports(5) configuration is required then
 set nfse_exports_compat="YES".
 
 > 
 > I guess that for the latter you'd also need to introduce some
 > compatibility shims into your kernel changes, such that a single kernel
 > could support both methods.
 
 Does "Both methods" mean "mountd and nfse"?  If so, then it works like
 this right now.  By default VFS_CHECKEXP() is used (mountd mode) and if
 nfse is called at least one time, then NFSE code in the NFS server is used.
 A user can continue to use mountd on modified system.
 
 > 
 > What is your opinion?
 > 
 
 There is opinion that nfse in its compatibility mode is not compatible
 with mountd and its configuration.  This opinion exist, because first
 versions of NFSE changes were incompatible with existent exports(5)
 configurations and I explained to several commiters why exports(5) format
 is wrong and why nfs.exports(5) format was created.  Then the compatibility
 mode was implemented and then it was improved several times.  I wrote
 comparison of the nfse compatibility mode with mountd and exports(5):
 
 http://nfse.sourceforge.net/COMPATIBILITY
 
 According to my understanding of exports(5) format I can say that "nfse -C"
 is completely compatible with exports(5) rules and mountd is incompatible
 with exports(5) rules.  Please note, that I do not compare nfs.exports(5)
 with exports(5), because they are not compatible.  The compatibility mode
 was implemented because I was told that supporting of existent exports(5)
 configuration is required.
 
 Also I made several changes to mountd to make it more compatible with
 exports(5) (available in PRs), or at least restore its compatibility
 with exports(5) that existed several years ago.  I asked questions whether
 these changes are POLA violations here:
 
 http://lists.freebsd.org/pipermail/freebsd-fs/2012-September/015175.html
 
 I have not received any replies on my requests to check nfse compatibility
 mode with existent configurations, so I think there is no opinion in the
 community about nfse compatibility mode with exports(5) configuration.
 Also, I have not received any replies about nfs.exports(5) configuration
 format and any technical opinions/review about NFSE changes in the kernel.
 
 I will repeat it again one more time.  It is not necessary to modify
 the kernel, patch or install something to check nfse compatibility mode
 and/or to check nfs.exports(5) format, just compile the nfse utility and
 use it to verify existent exports(5) configurations.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210221440.q9MEe2qi065456>