diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/nfs4_fs.h | 3 | ||||
-rw-r--r-- | fs/nfs/nfs4proc.c | 6 | ||||
-rw-r--r-- | fs/nfs/super.c | 5 |
3 files changed, 13 insertions, 1 deletions
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h index 832503c7a00e..a525fdefccde 100644 --- a/fs/nfs/nfs4_fs.h +++ b/fs/nfs/nfs4_fs.h | |||
@@ -380,6 +380,9 @@ extern bool nfs4_disable_idmapping; | |||
380 | extern unsigned short max_session_slots; | 380 | extern unsigned short max_session_slots; |
381 | extern unsigned short send_implementation_id; | 381 | extern unsigned short send_implementation_id; |
382 | 382 | ||
383 | #define NFS4_CLIENT_ID_UNIQ_LEN (64) | ||
384 | extern char nfs4_client_id_uniquifier[NFS4_CLIENT_ID_UNIQ_LEN]; | ||
385 | |||
383 | /* nfs4sysctl.c */ | 386 | /* nfs4sysctl.c */ |
384 | #ifdef CONFIG_SYSCTL | 387 | #ifdef CONFIG_SYSCTL |
385 | int nfs4_register_sysctl(void); | 388 | int nfs4_register_sysctl(void); |
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index b5834abfcbff..9aa97112426f 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -4068,9 +4068,13 @@ static unsigned int | |||
4068 | nfs4_init_uniform_client_string(const struct nfs_client *clp, | 4068 | nfs4_init_uniform_client_string(const struct nfs_client *clp, |
4069 | char *buf, size_t len) | 4069 | char *buf, size_t len) |
4070 | { | 4070 | { |
4071 | char *nodename = clp->cl_rpcclient->cl_nodename; | ||
4072 | |||
4073 | if (nfs4_client_id_uniquifier[0] != '\0') | ||
4074 | nodename = nfs4_client_id_uniquifier; | ||
4071 | return scnprintf(buf, len, "Linux NFSv%u.%u %s", | 4075 | return scnprintf(buf, len, "Linux NFSv%u.%u %s", |
4072 | clp->rpc_ops->version, clp->cl_minorversion, | 4076 | clp->rpc_ops->version, clp->cl_minorversion, |
4073 | clp->cl_rpcclient->cl_nodename); | 4077 | nodename); |
4074 | } | 4078 | } |
4075 | 4079 | ||
4076 | /** | 4080 | /** |
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 056138d45c11..56f02a9bd6d3 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -2662,6 +2662,7 @@ unsigned int nfs_idmap_cache_timeout = 600; | |||
2662 | bool nfs4_disable_idmapping = true; | 2662 | bool nfs4_disable_idmapping = true; |
2663 | unsigned short max_session_slots = NFS4_DEF_SLOT_TABLE_SIZE; | 2663 | unsigned short max_session_slots = NFS4_DEF_SLOT_TABLE_SIZE; |
2664 | unsigned short send_implementation_id = 1; | 2664 | unsigned short send_implementation_id = 1; |
2665 | char nfs4_client_id_uniquifier[NFS4_CLIENT_ID_UNIQ_LEN] = ""; | ||
2665 | 2666 | ||
2666 | EXPORT_SYMBOL_GPL(nfs_callback_set_tcpport); | 2667 | EXPORT_SYMBOL_GPL(nfs_callback_set_tcpport); |
2667 | EXPORT_SYMBOL_GPL(nfs_callback_tcpport); | 2668 | EXPORT_SYMBOL_GPL(nfs_callback_tcpport); |
@@ -2669,6 +2670,7 @@ EXPORT_SYMBOL_GPL(nfs_idmap_cache_timeout); | |||
2669 | EXPORT_SYMBOL_GPL(nfs4_disable_idmapping); | 2670 | EXPORT_SYMBOL_GPL(nfs4_disable_idmapping); |
2670 | EXPORT_SYMBOL_GPL(max_session_slots); | 2671 | EXPORT_SYMBOL_GPL(max_session_slots); |
2671 | EXPORT_SYMBOL_GPL(send_implementation_id); | 2672 | EXPORT_SYMBOL_GPL(send_implementation_id); |
2673 | EXPORT_SYMBOL_GPL(nfs4_client_id_uniquifier); | ||
2672 | 2674 | ||
2673 | #define NFS_CALLBACK_MAXPORTNR (65535U) | 2675 | #define NFS_CALLBACK_MAXPORTNR (65535U) |
2674 | 2676 | ||
@@ -2694,6 +2696,8 @@ static struct kernel_param_ops param_ops_portnr = { | |||
2694 | module_param_named(callback_tcpport, nfs_callback_set_tcpport, portnr, 0644); | 2696 | module_param_named(callback_tcpport, nfs_callback_set_tcpport, portnr, 0644); |
2695 | module_param(nfs_idmap_cache_timeout, int, 0644); | 2697 | module_param(nfs_idmap_cache_timeout, int, 0644); |
2696 | module_param(nfs4_disable_idmapping, bool, 0644); | 2698 | module_param(nfs4_disable_idmapping, bool, 0644); |
2699 | module_param_string(nfs4_unique_id, nfs4_client_id_uniquifier, | ||
2700 | NFS4_CLIENT_ID_UNIQ_LEN, 0600); | ||
2697 | MODULE_PARM_DESC(nfs4_disable_idmapping, | 2701 | MODULE_PARM_DESC(nfs4_disable_idmapping, |
2698 | "Turn off NFSv4 idmapping when using 'sec=sys'"); | 2702 | "Turn off NFSv4 idmapping when using 'sec=sys'"); |
2699 | module_param(max_session_slots, ushort, 0644); | 2703 | module_param(max_session_slots, ushort, 0644); |
@@ -2702,6 +2706,7 @@ MODULE_PARM_DESC(max_session_slots, "Maximum number of outstanding NFSv4.1 " | |||
2702 | module_param(send_implementation_id, ushort, 0644); | 2706 | module_param(send_implementation_id, ushort, 0644); |
2703 | MODULE_PARM_DESC(send_implementation_id, | 2707 | MODULE_PARM_DESC(send_implementation_id, |
2704 | "Send implementation ID with NFSv4.1 exchange_id"); | 2708 | "Send implementation ID with NFSv4.1 exchange_id"); |
2709 | MODULE_PARM_DESC(nfs4_unique_id, "nfs_client_id4 uniquifier string"); | ||
2705 | MODULE_ALIAS("nfs4"); | 2710 | MODULE_ALIAS("nfs4"); |
2706 | 2711 | ||
2707 | #endif /* CONFIG_NFS_V4 */ | 2712 | #endif /* CONFIG_NFS_V4 */ |