SUNRPC: allow /proc entries without CONFIG_SUNRPC_DEBUG
If we want /proc/sys/sunrpc the current kernel also drags in other debug features which we don't really want. Instead, we should always show the following entries: /proc/sys/sunrpc/udp_slot_table_entries /proc/sys/sunrpc/tcp_slot_table_entries /proc/sys/sunrpc/tcp_max_slot_table_entries /proc/sys/sunrpc/min_resvport /proc/sys/sunrpc/max_resvport /proc/sys/sunrpc/tcp_fin_timeout Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Thomas Preston <thomas.preston@codethink.co.uk> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
parent
ac0aa5e843
commit
8e2e5b7c49
|
@ -68,8 +68,6 @@ static unsigned int xprt_max_tcp_slot_table_entries = RPC_MAX_SLOT_TABLE;
|
||||||
static unsigned int xprt_min_resvport = RPC_DEF_MIN_RESVPORT;
|
static unsigned int xprt_min_resvport = RPC_DEF_MIN_RESVPORT;
|
||||||
static unsigned int xprt_max_resvport = RPC_DEF_MAX_RESVPORT;
|
static unsigned int xprt_max_resvport = RPC_DEF_MAX_RESVPORT;
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
|
|
||||||
|
|
||||||
#define XS_TCP_LINGER_TO (15U * HZ)
|
#define XS_TCP_LINGER_TO (15U * HZ)
|
||||||
static unsigned int xs_tcp_fin_timeout __read_mostly = XS_TCP_LINGER_TO;
|
static unsigned int xs_tcp_fin_timeout __read_mostly = XS_TCP_LINGER_TO;
|
||||||
|
|
||||||
|
@ -159,8 +157,6 @@ static struct ctl_table sunrpc_table[] = {
|
||||||
{ },
|
{ },
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Wait duration for a reply from the RPC portmapper.
|
* Wait duration for a reply from the RPC portmapper.
|
||||||
*/
|
*/
|
||||||
|
@ -3107,10 +3103,8 @@ static struct xprt_class xs_bc_tcp_transport = {
|
||||||
*/
|
*/
|
||||||
int init_socket_xprt(void)
|
int init_socket_xprt(void)
|
||||||
{
|
{
|
||||||
#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
|
|
||||||
if (!sunrpc_table_header)
|
if (!sunrpc_table_header)
|
||||||
sunrpc_table_header = register_sysctl_table(sunrpc_table);
|
sunrpc_table_header = register_sysctl_table(sunrpc_table);
|
||||||
#endif
|
|
||||||
|
|
||||||
xprt_register_transport(&xs_local_transport);
|
xprt_register_transport(&xs_local_transport);
|
||||||
xprt_register_transport(&xs_udp_transport);
|
xprt_register_transport(&xs_udp_transport);
|
||||||
|
@ -3126,12 +3120,10 @@ int init_socket_xprt(void)
|
||||||
*/
|
*/
|
||||||
void cleanup_socket_xprt(void)
|
void cleanup_socket_xprt(void)
|
||||||
{
|
{
|
||||||
#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
|
|
||||||
if (sunrpc_table_header) {
|
if (sunrpc_table_header) {
|
||||||
unregister_sysctl_table(sunrpc_table_header);
|
unregister_sysctl_table(sunrpc_table_header);
|
||||||
sunrpc_table_header = NULL;
|
sunrpc_table_header = NULL;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
xprt_unregister_transport(&xs_local_transport);
|
xprt_unregister_transport(&xs_local_transport);
|
||||||
xprt_unregister_transport(&xs_udp_transport);
|
xprt_unregister_transport(&xs_udp_transport);
|
||||||
|
|
Loading…
Reference in New Issue