public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Steve Dickson <steved@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/nfs-utils] rawhide: nfsd: don't assume service is running when setting thread count to 0
Date: Wed, 17 Jun 2026 01:10:07 GMT	[thread overview]
Message-ID: <178165860776.1.12140116969139611782.rpms-nfs-utils-4d41bcbd62bb@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/nfs-utils
            Branch : rawhide
            Commit : 4d41bcbd62bbc2974099aa5e1cf720dbddeac57c
            Author : Steve Dickson <steved@redhat.com>
            Date   : 2026-06-16T07:56:47-04:00
            Stats  : +45/-2 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/nfs-utils/c/4d41bcbd62bbc2974099aa5e1cf720dbddeac57c?branch=rawhide

            Log:
            nfsd: don't assume service is running when setting thread count to 0

Signed-off-by: Steve Dickson <steved@redhat.com>

---
diff --git a/nfs-utils-2.9.1-nfsd-thread-count-zero.patch b/nfs-utils-2.9.1-nfsd-thread-count-zero.patch
new file mode 100644
index 0000000..e33ae6f
--- /dev/null
+++ b/nfs-utils-2.9.1-nfsd-thread-count-zero.patch
@@ -0,0 +1,39 @@
+commit f993f1ceb5c5ca68d62cbdc1f040d228d6d9a018
+Author: Scott Mayhew <smayhew@redhat.com>
+Date:   Tue Jun 16 06:57:20 2026 -0400
+
+    nfsd: don't assume service is running when setting thread count to 0
+    
+    Newer kernels return -EIO if you try to write to /proc/fs/nfsd/threads
+    and there are no active listeners.
+    
+    Signed-off-by: Scott Mayhew <smayhew@redhat.com>
+    Signed-off-by: Steve Dickson <steved@redhat.com>
+
+diff --git a/utils/nfsd/nfsd.c b/utils/nfsd/nfsd.c
+index 365e145d..c95d32f4 100644
+--- a/utils/nfsd/nfsd.c
++++ b/utils/nfsd/nfsd.c
+@@ -311,12 +311,16 @@ main(int argc, char **argv)
+ 				argv[0], count);
+ 			count = 1;
+ 		} else if (count == 0) {
+-			/*
+-			 * don't bother setting anything else if the threads
+-			 * are coming down anyway.
+-			 */
+-			socket_up = 1;
+-			goto set_threads;
++			if (nfssvc_inuse()) {
++				/*
++				 * don't bother setting anything else if the threads
++				 * are coming down anyway.
++				 */
++				socket_up = 1;
++				goto set_threads;
++			} else {
++				goto out;
++			}
+ 		}
+ 	}
+ 

diff --git a/nfs-utils.spec b/nfs-utils.spec
index 316e681..67e17b9 100644
--- a/nfs-utils.spec
+++ b/nfs-utils.spec
@@ -2,7 +2,7 @@ Summary: NFS utilities and supporting clients and daemons for the kernel NFS ser
 Name: nfs-utils
 URL: http://linux-nfs.org/
 Version: 2.9.1
-Release: 3.rc4%{?dist}
+Release: 4.rc4%{?dist}
 Epoch: 1
 
 # group all 32bit related archs
@@ -16,6 +16,7 @@ Source4: 10-nfsv4.conf
 Source5: 10-nfsv3.conf
 
 Patch001: nfs-utils-2.9.2-rc4.patch
+Patch002: nfs-utils-2.9.1-nfsd-thread-count-zero.patch
 
 Patch100: nfs-utils-1.2.1-statdpath-man.patch
 Patch102: nfs-utils-1.2.5-idmap-errmsg.patch
@@ -476,7 +477,10 @@ rm -f %{_sysconfdir}/nfsmount.conf.d/10-nfsv4.conf
 %{_mandir}/*/rpcctl.8.gz
 
 %changelog
-* Sat May 30 2026 Steve Dickson <steved@redhat.com> 2.9.1-2-rc4
+* Tue Jun 16 2026 Steve Dickson <steved@redhat.com> 2.9.1-4-rc4
+- nfsd: don't assume service is running when setting thread count to 0
+
+* Sat May 30 2026 Steve Dickson <steved@redhat.com> 2.9.1-3-rc4
 - Updated to the latest RC release: nfs-utils-2-9-2-rc4
 
 * Wed May 20 2026 Steve Dickson <steved@redhat.com> 2.9.1-3-rc3

                 reply	other threads:[~2026-06-17  1:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=178165860776.1.12140116969139611782.rpms-nfs-utils-4d41bcbd62bb@fedoraproject.org \
    --to=steved@redhat.com \
    --cc=git-commits@fedoraproject.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