All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Dickson <steved@redhat.com>
To: Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Subject: [PATCH] nfsd: Set default minor versions
Date: Tue, 17 Apr 2018 14:42:20 -0400	[thread overview]
Message-ID: <20180417184220.54724-1-steved@redhat.com> (raw)

Due to the way the kernel stores the supported
minor versions, when a minor is turned off,
via the -N flag, it can only turned back on
via -V flag.

The default minor values should also enable
these minor versions.

Signed-off-by: Steve Dickson <steved@redhat.com>
---
 support/include/nfs/nfs.h | 1 +
 utils/nfsd/nfsd.c         | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/support/include/nfs/nfs.h b/support/include/nfs/nfs.h
index 7933ff5..b7d9e06 100644
--- a/support/include/nfs/nfs.h
+++ b/support/include/nfs/nfs.h
@@ -40,6 +40,7 @@ struct nfs_fh_len {
 #define NFSCTL_TCPISSET(_cltbits)     ((_cltbits) & NFSCTL_TCPBIT) 
 
 #define NFSCTL_VERDEFAULT (0xc)       /* versions 3 and 4 */
+#define NFSCTL_MINDEFAULT (0x7)       /* minor versions 4.1 and 4.2 */
 #define NFSCTL_VERSET(_cltbits, _v)   ((_cltbits) |= (1 << ((_v) - 1))) 
 #define NFSCTL_MINORSET(_cltbits, _v)   ((_cltbits) |= (1 << (_v)))
 #define NFSCTL_UDPSET(_cltbits)       ((_cltbits) |= NFSCTL_UDPBIT)
diff --git a/utils/nfsd/nfsd.c b/utils/nfsd/nfsd.c
index f41a2de..2303a5d 100644
--- a/utils/nfsd/nfsd.c
+++ b/utils/nfsd/nfsd.c
@@ -65,8 +65,8 @@ main(int argc, char **argv)
 	int hcounter = 0;
 	struct conf_list *hosts;
 	int	socket_up = 0;
-	unsigned int minorvers = 0;
-	unsigned int minorversset = 0;
+	unsigned int minorvers = NFSCTL_MINDEFAULT;
+	unsigned int minorversset = NFSCTL_MINDEFAULT;
 	unsigned int minormask = 0;
 	unsigned int versbits = NFSCTL_VERDEFAULT;
 	unsigned int protobits = NFSCTL_PROTODEFAULT;
-- 
2.14.3


             reply	other threads:[~2018-04-17 18:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-17 18:42 Steve Dickson [this message]
2018-04-18 16:22 ` [PATCH] nfsd: Set default minor versions J. Bruce Fields
2018-04-20 15:02   ` Steve Dickson
2018-04-20 15:03 ` Steve Dickson

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=20180417184220.54724-1-steved@redhat.com \
    --to=steved@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.