Skip to contentSkip to conversation

nfsdctl fixes

PATCH In review Scott Mayhew 3 participants 6 messages Nov 18, 2024 – Nov 20, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover nfsdctl fixes

Two minor fixes for things I noticed while experimenting with nfsdctl.

Scott Mayhew (2):
nfsdctl: fix up the help text in version_usage()
nfsdctl: clarify when versions can be set on the man page

 utils/nfsdctl/nfsdctl.8    | 12 ++++++++++--
 utils/nfsdctl/nfsdctl.adoc |  2 ++
 utils/nfsdctl/nfsdctl.c    |  4 ++--
 3 files changed, 14 insertions(+), 4 deletions(-)
Signature · 1 line
2.46.2
#1 lore raw

PATCH 1/2 nfsdctl: fix up the help text in version_usage()

The help text in version_usage() has examples with a 'v' character in the version string, but the format string in the sscanf() call in version_func() doesn't contain a 'v' character.

---
 utils/nfsdctl/nfsdctl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
utils/nfsdctl/nfsdctl.c +2 -2
index f7c27632..ef917ff0 100644
@@ -764,9 +764,9 @@ static void version_usage(void)
 	printf("    Display currently enabled and disabled versions:\n");
 	printf("        version\n");
 	printf("    Disable NFSv4.0:\n");
-	printf("        version -v4.0\n");
+	printf("        version -4.0\n");
 	printf("    Enable v4.1, v4.2, disable v2, v3 and v4.0:\n");
-	printf("        version -2 -3 -v4.0 +4.1 +v4.2\n");
+	printf("        version -2 -3 -4.0 +4.1 +4.2\n");
 }
 
 static int version_func(struct nl_sock *sock, int argc, char ** argv)
Signature · 1 line
2.46.2
#2 lore raw

Re: [nfs-utils PATCH 1/2] nfsdctl: fix up the help text in version_usage()

Quoted 5 lines · Scott Mayhew

The help text in version_usage() has examples with a 'v' character in the version string, but the format string in the sscanf() call in version_func() doesn't contain a 'v' character.

Committed... (tag: nfs-utils-2-8-2-rc2)

steved.

Quoted 20 lines
---
  utils/nfsdctl/nfsdctl.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
utils/nfsdctl/nfsdctl.c +2 -2
index f7c27632..ef917ff0 100644
@@ -764,9 +764,9 @@ static void version_usage(void)
  	printf("    Display currently enabled and disabled versions:\n");
  	printf("        version\n");
  	printf("    Disable NFSv4.0:\n");
-	printf("        version -v4.0\n");
+	printf("        version -4.0\n");
  	printf("    Enable v4.1, v4.2, disable v2, v3 and v4.0:\n");
-	printf("        version -2 -3 -v4.0 +4.1 +v4.2\n");
+	printf("        version -2 -3 -4.0 +4.1 +4.2\n");
  }
 
  static int version_func(struct nl_sock *sock, int argc, char ** argv)
#3 lore raw

PATCH 2/2 nfsdctl: clarify when versions can be set on the man page

In reply to Scott Mayhew

Attempting to make version changes while there are nfsd threads running fails with -EBUSY, so make note of it on the man page.

---
 utils/nfsdctl/nfsdctl.8    | 12 ++++++++++--
 utils/nfsdctl/nfsdctl.adoc |  2 ++
 2 files changed, 12 insertions(+), 2 deletions(-)
utils/nfsdctl/nfsdctl.8 +10 -2
index dae1863d..38dd1d30 100644
@@ -2,12 +2,12 @@
 .\"     Title: nfsdctl
 .\"    Author: Jeff Layton
 .\" Generator: Asciidoctor 2.0.20
-.\"      Date: 2024-07-22
+.\"      Date: 2024-11-18
 .\"    Manual: \ \&
 .\"    Source: \ \&
 .\"  Language: English
 .\"
-.TH "NFSDCTL" "8" "2024-07-22" "\ \&" "\ \&"
+.TH "NFSDCTL" "8" "2024-11-18" "\ \&" "\ \&"
 .ie \n(.g .ds Aq \(aq
 .el       .ds Aq '
 .ss \n[.ss] 0
@@ -176,6 +176,14 @@ all minorversions for that major version.
 .fam
 .fi
 .if n .RE
+.sp
+.if n .RS 4
+.nf
+.fam C
+Note that versions can only be set when there are no nfsd threads running.
+.fam
+.fi
+.if n .RE
 .RE
 .sp
 \fBpool\-mode\fP
utils/nfsdctl/nfsdctl.adoc +2 -0
index 7119b44d..79f07cf0 100644
@@ -93,6 +93,8 @@ Each subcommand can also accept its own set of options and arguments. The
   The minorversion field is optional. If not given, it will disable or enable
   all minorversions for that major version.
 
+  Note that versions can only be set when there are no nfsd threads running.
+
 *pool-mode*::
 
   Get/set the host's pool mode. This will cause the server to start threads
Signature · 1 line
2.46.2
#4 lore raw

Re: [nfs-utils PATCH 2/2] nfsdctl: clarify when versions can be set on the man page

Quoted 4 lines · Scott Mayhew

Attempting to make version changes while there are nfsd threads running fails with -EBUSY, so make note of it on the man page.

Committed... (tag: nfs-utils-2-8-2-rc2)

steved.

Quoted 52 lines
---
  utils/nfsdctl/nfsdctl.8    | 12 ++++++++++--
  utils/nfsdctl/nfsdctl.adoc |  2 ++
  2 files changed, 12 insertions(+), 2 deletions(-)
utils/nfsdctl/nfsdctl.8 +10 -2
index dae1863d..38dd1d30 100644
@@ -2,12 +2,12 @@
  .\"     Title: nfsdctl
  .\"    Author: Jeff Layton
  .\" Generator: Asciidoctor 2.0.20
-.\"      Date: 2024-07-22
+.\"      Date: 2024-11-18
  .\"    Manual: \ \&
  .\"    Source: \ \&
  .\"  Language: English
  .\"
-.TH "NFSDCTL" "8" "2024-07-22" "\ \&" "\ \&"
+.TH "NFSDCTL" "8" "2024-11-18" "\ \&" "\ \&"
  .ie \n(.g .ds Aq \(aq
  .el       .ds Aq '
  .ss \n[.ss] 0
@@ -176,6 +176,14 @@ all minorversions for that major version.
  .fam
  .fi
  .if n .RE
+.sp
+.if n .RS 4
+.nf
+.fam C
+Note that versions can only be set when there are no nfsd threads running.
+.fam
+.fi
+.if n .RE
  .RE
  .sp
  \fBpool\-mode\fP
utils/nfsdctl/nfsdctl.adoc +2 -0
index 7119b44d..79f07cf0 100644
@@ -93,6 +93,8 @@ Each subcommand can also accept its own set of options and arguments. The
    The minorversion field is optional. If not given, it will disable or enable
    all minorversions for that major version.
 
+  Note that versions can only be set when there are no nfsd threads running.
+
  *pool-mode*::
 
    Get/set the host's pool mode. This will cause the server to start threads
maintainer Reviewed-by on the v1 series
#5 lore raw
In reply to Scott Mayhew
Quoted 11 lines · Scott Mayhew

Two minor fixes for things I noticed while experimenting with nfsdctl.

Scott Mayhew (2):
nfsdctl: fix up the help text in version_usage()
nfsdctl: clarify when versions can be set on the man page

 utils/nfsdctl/nfsdctl.8    | 12 ++++++++++--
 utils/nfsdctl/nfsdctl.adoc |  2 ++
 utils/nfsdctl/nfsdctl.c    |  4 ++--
 3 files changed, 14 insertions(+), 4 deletions(-)

You can add this to both: