public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/1] nfsd: Set v4 version when only a minor version is set
@ 2022-10-27 18:51 Steve Dickson
  2022-10-27 18:51 ` [PATCH 1/1] " Steve Dickson
  0 siblings, 1 reply; 2+ messages in thread
From: Steve Dickson @ 2022-10-27 18:51 UTC (permalink / raw)
  To: Linux NFS Mailing list

Make sure the v4 version is set when only a minor
version is set in /etc/nfs.conf

Set v4 version if only minor version are specified

When vers4 in /etc/nfs.conf is set to 'n', all minor
version are disabled as well. But when vers4 is set
'y' all minor version are settable. Meaning 

vers4=n
vers4.2=y 
does not work. rpc.nfsd complains there are no
version set. 

vers4=y
vers4=y
does work.

Now the rpc.nfsd(8) man page does say 
   vers4  Enable or disable a major NFS version.
   
It could be changed to 
    vers4  Enable or disable all major NFS versions.
    
Or the two line patch attached could be applied.

Steve Dickson (1):
  nfsd: Set v4 version when only a minor version is set

 utils/nfsd/nfsd.c | 3 +++
 1 file changed, 3 insertions(+)

-- 
2.37.3


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] nfsd: Set v4 version when only a minor version is set
  2022-10-27 18:51 [RFC PATCH 0/1] nfsd: Set v4 version when only a minor version is set Steve Dickson
@ 2022-10-27 18:51 ` Steve Dickson
  0 siblings, 0 replies; 2+ messages in thread
From: Steve Dickson @ 2022-10-27 18:51 UTC (permalink / raw)
  To: Linux NFS Mailing list

Make sure the v4 version is set when only a minor
version is set in /etc/nfs.conf

Signed-off-by: Steve Dickson <steved@redhat.com>
---
 utils/nfsd/nfsd.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/utils/nfsd/nfsd.c b/utils/nfsd/nfsd.c
index 4016a76..87c5ce9 100644
--- a/utils/nfsd/nfsd.c
+++ b/utils/nfsd/nfsd.c
@@ -154,6 +154,9 @@ main(int argc, char **argv)
 		if (conf_get_bool("nfsd", tag, 0)) {
 			NFSCTL_MINORSET(minorversset, i);
 			NFSCTL_MINORSET(minorvers, i);
+			/* Make sure v4 is set */
+			if (!NFSCTL_VERISSET(versbits, 4))
+				NFSCTL_VERSET(versbits, 4);
 			if (i == 0)
 				force4dot0 = 1;
 		}
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-27 18:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-27 18:51 [RFC PATCH 0/1] nfsd: Set v4 version when only a minor version is set Steve Dickson
2022-10-27 18:51 ` [PATCH 1/1] " Steve Dickson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox