Document a few sysctls in the NFS client and server code.
Minor style(9) where applicable. Approved by: alfred (slightly older version)
This commit is contained in:
parent
b14bf100e9
commit
8b4acb0cc0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=184561
@ -84,7 +84,8 @@ SYSCTL_DECL(_vfs_nfs);
|
||||
|
||||
/* Maximum number of seconds a nfsiod kthread will sleep before exiting */
|
||||
static unsigned int nfs_iodmaxidle = 120;
|
||||
SYSCTL_UINT(_vfs_nfs, OID_AUTO, iodmaxidle, CTLFLAG_RW, &nfs_iodmaxidle, 0, "");
|
||||
SYSCTL_UINT(_vfs_nfs, OID_AUTO, iodmaxidle, CTLFLAG_RW, &nfs_iodmaxidle, 0,
|
||||
"Max number of seconds an nfsiod kthread will sleep before exiting");
|
||||
|
||||
/* Maximum number of nfsiod kthreads */
|
||||
unsigned int nfs_iodmax = 20;
|
||||
@ -121,7 +122,8 @@ sysctl_iodmin(SYSCTL_HANDLER_ARGS)
|
||||
return (0);
|
||||
}
|
||||
SYSCTL_PROC(_vfs_nfs, OID_AUTO, iodmin, CTLTYPE_UINT | CTLFLAG_RW, 0,
|
||||
sizeof (nfs_iodmin), sysctl_iodmin, "IU", "");
|
||||
sizeof (nfs_iodmin), sysctl_iodmin, "IU",
|
||||
"Min number of nfsiod kthreads to keep as spares");
|
||||
|
||||
|
||||
static int
|
||||
@ -157,7 +159,8 @@ sysctl_iodmax(SYSCTL_HANDLER_ARGS)
|
||||
return (0);
|
||||
}
|
||||
SYSCTL_PROC(_vfs_nfs, OID_AUTO, iodmax, CTLTYPE_UINT | CTLFLAG_RW, 0,
|
||||
sizeof (nfs_iodmax), sysctl_iodmax, "IU", "");
|
||||
sizeof (nfs_iodmax), sysctl_iodmax, "IU",
|
||||
"Max number of nfsiod kthreads");
|
||||
|
||||
int
|
||||
nfs_nfsiodnew(void)
|
||||
@ -208,7 +211,8 @@ nfsiod_setup(void *dummy)
|
||||
SYSINIT(nfsiod, SI_SUB_KTHREAD_IDLE, SI_ORDER_ANY, nfsiod_setup, NULL);
|
||||
|
||||
static int nfs_defect = 0;
|
||||
SYSCTL_INT(_vfs_nfs, OID_AUTO, defect, CTLFLAG_RW, &nfs_defect, 0, "");
|
||||
SYSCTL_INT(_vfs_nfs, OID_AUTO, defect, CTLFLAG_RW, &nfs_defect, 0,
|
||||
"Allow nfsiods to migrate serving different mounts");
|
||||
|
||||
/*
|
||||
* Asynchronous I/O daemons for client nfs.
|
||||
|
@ -87,14 +87,18 @@ static int fake_wchan;
|
||||
|
||||
SYSCTL_DECL(_vfs_nfs);
|
||||
|
||||
SYSCTL_INT(_vfs_nfs, OID_AUTO, realign_test, CTLFLAG_RW, &nfs_realign_test, 0, "");
|
||||
SYSCTL_INT(_vfs_nfs, OID_AUTO, realign_count, CTLFLAG_RW, &nfs_realign_count, 0, "");
|
||||
SYSCTL_INT(_vfs_nfs, OID_AUTO, bufpackets, CTLFLAG_RW, &nfs_bufpackets, 0, "");
|
||||
SYSCTL_INT(_vfs_nfs, OID_AUTO, realign_test, CTLFLAG_RW, &nfs_realign_test, 0,
|
||||
"Number of realign tests done");
|
||||
SYSCTL_INT(_vfs_nfs, OID_AUTO, realign_count, CTLFLAG_RW, &nfs_realign_count, 0,
|
||||
"Number of mbuf realignments done");
|
||||
SYSCTL_INT(_vfs_nfs, OID_AUTO, bufpackets, CTLFLAG_RW, &nfs_bufpackets, 0,
|
||||
"Buffer reservation size 2 < x < 64");
|
||||
SYSCTL_INT(_vfs_nfs, OID_AUTO, reconnects, CTLFLAG_RD, &nfs_reconnects, 0,
|
||||
"number of times the nfs client has had to reconnect");
|
||||
"Number of times the nfs client has had to reconnect");
|
||||
SYSCTL_INT(_vfs_nfs, OID_AUTO, nfs3_jukebox_delay, CTLFLAG_RW, &nfs3_jukebox_delay, 0,
|
||||
"number of seconds to delay a retry after receiving EJUKEBOX");
|
||||
SYSCTL_INT(_vfs_nfs, OID_AUTO, skip_wcc_data_onerr, CTLFLAG_RW, &nfs_skip_wcc_data_onerr, 0, "");
|
||||
"Number of seconds to delay a retry after receiving EJUKEBOX");
|
||||
SYSCTL_INT(_vfs_nfs, OID_AUTO, skip_wcc_data_onerr, CTLFLAG_RW, &nfs_skip_wcc_data_onerr, 0,
|
||||
"Disable weak cache consistency checking when server returns an error");
|
||||
|
||||
/*
|
||||
* There is a congestion window for outstanding rpcs maintained per mount
|
||||
|
@ -730,7 +730,8 @@ nfs_loadattrcache(struct vnode **vpp, struct mbuf **mdp, caddr_t *dposp,
|
||||
#include <sys/sysctl.h>
|
||||
SYSCTL_DECL(_vfs_nfs);
|
||||
static int nfs_acdebug;
|
||||
SYSCTL_INT(_vfs_nfs, OID_AUTO, acdebug, CTLFLAG_RW, &nfs_acdebug, 0, "");
|
||||
SYSCTL_INT(_vfs_nfs, OID_AUTO, acdebug, CTLFLAG_RW, &nfs_acdebug, 0,
|
||||
"Toggle acdebug (access cache debug) flag");
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -92,18 +92,22 @@ SYSCTL_STRUCT(_vfs_nfs, NFS_NFSSTATS, nfsstats, CTLFLAG_RW,
|
||||
&nfsstats, nfsstats, "S,nfsstats");
|
||||
static int nfs_ip_paranoia = 1;
|
||||
SYSCTL_INT(_vfs_nfs, OID_AUTO, nfs_ip_paranoia, CTLFLAG_RW,
|
||||
&nfs_ip_paranoia, 0, "");
|
||||
&nfs_ip_paranoia, 0,
|
||||
"Disallow accepting replies from IPs which differ from those sent");
|
||||
#ifdef NFS_DEBUG
|
||||
int nfs_debug;
|
||||
SYSCTL_INT(_vfs_nfs, OID_AUTO, debug, CTLFLAG_RW, &nfs_debug, 0, "");
|
||||
SYSCTL_INT(_vfs_nfs, OID_AUTO, debug, CTLFLAG_RW, &nfs_debug, 0,
|
||||
"Toggle debug flag");
|
||||
#endif
|
||||
static int nfs_tprintf_initial_delay = NFS_TPRINTF_INITIAL_DELAY;
|
||||
SYSCTL_INT(_vfs_nfs, NFS_TPRINTF_INITIAL_DELAY,
|
||||
downdelayinitial, CTLFLAG_RW, &nfs_tprintf_initial_delay, 0, "");
|
||||
downdelayinitial, CTLFLAG_RW, &nfs_tprintf_initial_delay, 0,
|
||||
"Delay before printing \"nfs server not responding\" messages");
|
||||
/* how long between console messages "nfs server foo not responding" */
|
||||
static int nfs_tprintf_delay = NFS_TPRINTF_DELAY;
|
||||
SYSCTL_INT(_vfs_nfs, NFS_TPRINTF_DELAY,
|
||||
downdelayinterval, CTLFLAG_RW, &nfs_tprintf_delay, 0, "");
|
||||
downdelayinterval, CTLFLAG_RW, &nfs_tprintf_delay, 0,
|
||||
"Delay between printing \"nfs server not responding\" messages");
|
||||
|
||||
static void nfs_decode_args(struct mount *mp, struct nfsmount *nmp,
|
||||
struct nfs_args *argp, const char *hostname);
|
||||
@ -158,14 +162,15 @@ struct nfsv3_diskless nfsv3_diskless = { { { 0 } } };
|
||||
int nfs_diskless_valid = 0;
|
||||
|
||||
SYSCTL_INT(_vfs_nfs, OID_AUTO, diskless_valid, CTLFLAG_RD,
|
||||
&nfs_diskless_valid, 0, "");
|
||||
&nfs_diskless_valid, 0,
|
||||
"Has the diskless struct been filled correctly");
|
||||
|
||||
SYSCTL_STRING(_vfs_nfs, OID_AUTO, diskless_rootpath, CTLFLAG_RD,
|
||||
nfsv3_diskless.root_hostnam, 0, "");
|
||||
nfsv3_diskless.root_hostnam, 0, "Path to nfs root");
|
||||
|
||||
SYSCTL_OPAQUE(_vfs_nfs, OID_AUTO, diskless_rootaddr, CTLFLAG_RD,
|
||||
&nfsv3_diskless.root_saddr, sizeof nfsv3_diskless.root_saddr,
|
||||
"%Ssockaddr_in", "");
|
||||
&nfsv3_diskless.root_saddr, sizeof nfsv3_diskless.root_saddr,
|
||||
"%Ssockaddr_in", "Diskless root nfs address");
|
||||
|
||||
|
||||
void nfsargs_ntoh(struct nfs_args *);
|
||||
|
@ -130,8 +130,10 @@ SYSCTL_NODE(_vfs, OID_AUTO, nfsrv, CTLFLAG_RW, 0, "NFS server");
|
||||
static int nfs_async;
|
||||
static int nfs_commit_blks;
|
||||
static int nfs_commit_miss;
|
||||
SYSCTL_INT(_vfs_nfsrv, OID_AUTO, async, CTLFLAG_RW, &nfs_async, 0, "");
|
||||
SYSCTL_INT(_vfs_nfsrv, OID_AUTO, commit_blks, CTLFLAG_RW, &nfs_commit_blks, 0, "");
|
||||
SYSCTL_INT(_vfs_nfsrv, OID_AUTO, async, CTLFLAG_RW, &nfs_async, 0,
|
||||
"Tell client that writes were synced even though they were not");
|
||||
SYSCTL_INT(_vfs_nfsrv, OID_AUTO, commit_blks, CTLFLAG_RW, &nfs_commit_blks, 0,
|
||||
"Number of completed commits");
|
||||
SYSCTL_INT(_vfs_nfsrv, OID_AUTO, commit_miss, CTLFLAG_RW, &nfs_commit_miss, 0, "");
|
||||
|
||||
struct nfsrvstats nfsrvstats;
|
||||
|
@ -89,11 +89,14 @@ static int notstarted = 1;
|
||||
|
||||
static int nfs_privport = 0;
|
||||
SYSCTL_INT(_vfs_nfsrv, NFS_NFSPRIVPORT, nfs_privport, CTLFLAG_RW,
|
||||
&nfs_privport, 0, "");
|
||||
&nfs_privport, 0,
|
||||
"Only allow clients using a privileged port");
|
||||
SYSCTL_INT(_vfs_nfsrv, OID_AUTO, gatherdelay, CTLFLAG_RW,
|
||||
&nfsrvw_procrastinate, 0, "");
|
||||
&nfsrvw_procrastinate, 0,
|
||||
"Delay value for write gathering");
|
||||
SYSCTL_INT(_vfs_nfsrv, OID_AUTO, gatherdelay_v3, CTLFLAG_RW,
|
||||
&nfsrvw_procrastinate_v3, 0, "");
|
||||
&nfsrvw_procrastinate_v3, 0,
|
||||
"Delay in seconds for NFSv3 write gathering");
|
||||
|
||||
static int nfssvc_addsock(struct file *, struct sockaddr *);
|
||||
static void nfsrv_zapsock(struct nfssvc_sock *slp);
|
||||
|
Loading…
Reference in New Issue
Block a user