nfsd: remove min_threads file from nfsdfs
Subsystems (2)
Jeff Layton
maintainerPATCH 1/1 nfsd: remove min_threads file from nfsdfs
It was handy while I was developing the dynamic threading patches, but we don't have any plans to make this setting available via legacy rpc.nfsd. Remove the min_threads file from nfsdfs since only netlink interfaces were intended to get support for this.
---
As we discussed in another thread, this file should never have been added to the procfs interfaces. This patch just removes it, and leaves netlink as the sole way to set min-threads.
--- fs/nfsd/nfsctl.c | 44 -------------------------------------------- 1 file changed, 44 deletions(-)
fs/nfsd/nfsctl.c +0 -44
@@ -48,7 +48,6 @@ enum { NFSD_Versions, NFSD_Ports, NFSD_MaxBlkSize, - NFSD_MinThreads, NFSD_Filecache, NFSD_Leasetime, NFSD_Gracetime,
@@ -68,7 +67,6 @@ static ssize_t write_pool_threads(struct file *file, char *buf, size_t size);static ssize_t write_versions (struct file *file,char *buf,size_t size);static ssize_t write_ports (struct file *file,char *buf,size_t size);static ssize_t write_maxblksize (struct file *file,char *buf,size_t size); -static ssize_t write_minthreads (struct file *file,char *buf,size_t size);#ifdef CONFIG_NFSD_V4 static ssize_t write_leasetime (struct file *file,char *buf,size_t size);static ssize_t write_gracetime (struct file *file,char *buf,size_t size);
@@ -87,7 +85,6 @@ static ssize_t (*const write_op[])(struct file *, char *, size_t) = { [NFSD_Versions] = write_versions, [NFSD_Ports] = write_ports, [NFSD_MaxBlkSize] = write_maxblksize, - [NFSD_MinThreads] = write_minthreads, #ifdef CONFIG_NFSD_V4 [NFSD_Leasetime] = write_leasetime, [NFSD_Gracetime] = write_gracetime,
@@ -910,46 +907,6 @@ static ssize_t write_maxblksize(struct file *file, char *buf, size_t size) nfsd_max_blksize); } -/* -* write_minthreads - Set or report the current min number of threads per pool -* -* Input: -* buf: ignored -* size: zero -* OR -* -* Input: -* buf: C string containing an unsigned -* integer value representing the new -* min number of threads per pool -* size: non-zero length of C string in @buf -* Output: -* On success: passed-in buffer filled with '\n'-terminated C string -* containing numeric value of min_threads setting -* for this net namespace; -* return code is the size in bytes of the string -* On error: return code is zero or a negative errno value -*/ -static ssize_t write_minthreads (struct file *file,char *buf,size_t size) -{ -char *mesg = buf; -struct nfsd_net *nn =net_generic (netns (file), nfsd_net_id); -unsigned int minthreads = nn->min_threads; - -if (size >0 ) { -int rv =get_uint (&mesg, &minthreads); - -if (rv) -return rv; -trace_nfsd_ctl_minthreads (netns (file), minthreads); -mutex_lock (&nfsd_mutex); - nn->min_threads = minthreads; -mutex_unlock (&nfsd_mutex); - } - -return scnprintf (buf,SIMPLE_TRANSACTION_LIMIT ,"%u\n" , minthreads); -} -#ifdef CONFIG_NFSD_V4 static ssize_t __nfsd4_write_time (struct file *file,char *buf,size_t size,time64_t *time,struct nfsd_net *nn)
@@ -1342,7 +1299,6 @@ static int nfsd_fill_super(struct super_block *sb, struct fs_context *fc) [NFSD_Versions] = {"versions", &transaction_ops, S_IWUSR|S_IRUSR}, [NFSD_Ports] = {"portlist", &transaction_ops, S_IWUSR|S_IRUGO}, [NFSD_MaxBlkSize] = {"max_block_size", &transaction_ops, S_IWUSR|S_IRUGO}, - [NFSD_MinThreads] = {"min_threads", &transaction_ops, S_IWUSR|S_IRUGO}, [NFSD_Filecache] = {"filecache" , &nfsd_file_cache_stats_fops,S_IRUGO }, #ifdef CONFIG_NFSD_V4 [NFSD_Leasetime] = {"nfsv4leasetime", &transaction_ops, S_IWUSR|S_IRUSR},
---
base-commit: d561c36ceba65324973356b738511b90b6e58b22
change-id: 20260122-minthreads-2008d8a86685
Best regards,
Signature · 1 line
Jeff Layton <[email protected]>
Chuck Lever
maintainerFrom: Chuck Lever <[email protected]>
Quoted 6 lines · Jeff Layton
It was handy while I was developing the dynamic threading patches, but we don't have any plans to make this setting available via legacy rpc.nfsd. Remove the
min_threadsfile from nfsdfs since only netlink interfaces were intended to get support for this.
The dynamic thread series is still in nfsd-testing for a few more days, so I squashed this one into "nfsd: add controls to set the minimum number of threads per pool" and updated the commit message to reflect the change.
The update will appear on git.kernel.org in a few minutes.
[1/1] nfsd: remove min_threads file from nfsdfs
(no commit info)
--
Chuck Lever