Linux NFS development
 help / color / mirror / Atom feed
From: Steve Dickson <SteveD@RedHat.com>
To: Justin Mitchell <jumitche@redhat.com>, linux-nfs@vger.kernel.org
Subject: Re: [PATCH] nfs-utils: Fix version setting by config for vers4
Date: Wed, 26 Sep 2018 12:41:58 -0400	[thread overview]
Message-ID: <6cb11ada-cbb6-35f3-1011-3729624bceab@RedHat.com> (raw)
In-Reply-To: <1537476294.8924.12.camel@redhat.com>



On 9/20/18 4:44 PM, Justin Mitchell wrote:
> The code path for setting major versions via nfs.conf was not
> the same as setting it by cli option, resulting in vers4=n not
> working unless vers4.0=n was also set
> 
> Signed-off-by: Justin Mitchell <jumitche@redhat.com>
> ---
>  utils/nfsd/nfsd.c | 15 ++++++++++++---
>  1 file changed, 12 insertions(+), 3 deletions(-)
Committed.... 

steved.

> 
> diff --git a/utils/nfsd/nfsd.c b/utils/nfsd/nfsd.c
> index 6b57e2b..b256bd9 100644
> --- a/utils/nfsd/nfsd.c
> +++ b/utils/nfsd/nfsd.c
> @@ -83,6 +83,9 @@ main(int argc, char **argv)
>  
>  	conf_init_file(NFS_CONFFILE); 
>  	xlog_from_conffile("nfsd");
> +
> +	nfssvc_get_minormask(&minormask);
> +
>  	count = conf_get_num("nfsd", "threads", count);
>  	grace = conf_get_num("nfsd", "grace-time", grace);
>  	lease = conf_get_num("nfsd", "lease-time", lease);
> @@ -101,13 +104,19 @@ main(int argc, char **argv)
>  	for (i = 2; i <= 4; i++) {
>  		char tag[20];
>  		sprintf(tag, "vers%d", i);
> -		if (conf_get_bool("nfsd", tag, NFSCTL_VERISSET(versbits, i)))
> +		if (conf_get_bool("nfsd", tag, NFSCTL_VERISSET(versbits, i))) {
>  			NFSCTL_VERSET(versbits, i);
> -		else
> +			if (i == 4)
> +				minorvers = minorversset = minormask;
> +		} else {
>  			NFSCTL_VERUNSET(versbits, i);
> +			if (i == 4) {
> +				minorvers = 0;
> +				minorversset = minormask;
> +			}
> +		}
>  	}
>  
> -	nfssvc_get_minormask(&minormask);
>  	/* We assume the kernel will default all minor versions to 'on',
>  	 * and allow the config file to disable some.
>  	 */
> 

      reply	other threads:[~2018-09-26 22:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-20 20:44 [PATCH] nfs-utils: Fix version setting by config for vers4 Justin Mitchell
2018-09-26 16:41 ` Steve Dickson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6cb11ada-cbb6-35f3-1011-3729624bceab@RedHat.com \
    --to=steved@redhat.com \
    --cc=jumitche@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox