nfsd: Set default minor versions (bz 1570066)

Signed-off-by: Steve Dickson <steved@redhat.com>
This commit is contained in:
Steve Dickson 2018-05-03 11:18:49 -04:00
parent fb20090990
commit e2170b5355
2 changed files with 49 additions and 1 deletions

View File

@ -0,0 +1,44 @@
commit 1a372a7b656ddf2be21ddad70b6c64c9d1d9d161
Author: Steve Dickson <steved@redhat.com>
Date: Tue Apr 17 14:26:44 2018 -0400
nfsd: Set default minor versions
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.
Acked-by: J. Bruce Fields <bfields@fieldses.org>
Signed-off-by: Steve Dickson <steved@redhat.com>
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;

View File

@ -2,7 +2,7 @@ Summary: NFS utilities and supporting clients and daemons for the kernel NFS ser
Name: nfs-utils Name: nfs-utils
URL: http://linux-nfs.org/ URL: http://linux-nfs.org/
Version: 2.3.1 Version: 2.3.1
Release: 7.rc1%{?dist} Release: 8.rc1%{?dist}
Epoch: 1 Epoch: 1
# group all 32bit related archs # group all 32bit related archs
@ -17,6 +17,7 @@ Source5: 24-nfs-server.conf
Patch001: nfs-utils-2.3.2-rc1.patch Patch001: nfs-utils-2.3.2-rc1.patch
Patch002: nfs-utils-2.3.1-mount-auto-v3.patch Patch002: nfs-utils-2.3.1-mount-auto-v3.patch
Patch003: nfs-utils-2.3.1-mount-setdefault-minor.patch
Patch100: nfs-utils-1.2.1-statdpath-man.patch Patch100: nfs-utils-1.2.1-statdpath-man.patch
Patch101: nfs-utils-1.2.1-exp-subtree-warn-off.patch Patch101: nfs-utils-1.2.1-exp-subtree-warn-off.patch
@ -310,6 +311,9 @@ fi
%{_libdir}/libnfsidmap.so %{_libdir}/libnfsidmap.so
%changelog %changelog
* Thu May 3 2018 Steve Dickson <steved@redhat.com> 2.3.1-8.rc1
- nfsd: Set default minor versions (bz 1570066)
* Wed Apr 11 2018 Steve Dickson <steved@redhat.com> 2.3.1-7.rc1 * Wed Apr 11 2018 Steve Dickson <steved@redhat.com> 2.3.1-7.rc1
- mount.nfs: Fix auto protocol negotiation (bz 1565310) - mount.nfs: Fix auto protocol negotiation (bz 1565310)