aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/super.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2012-09-14 17:24:41 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-10-01 18:33:33 -0400
commit6f2ea7f2a3ff3cd342bface43f8b4bf5e431cf36 (patch)
treec20a5610aa8f934cb46bbb38c901e16d43ea602a /fs/nfs/super.c
parent05f4c350ee02e9461c6ae3a880ea326a06835e37 (diff)
NFS: Add nfs4_unique_id boot parameter
An optional boot parameter is introduced to allow client administrators to specify a string that the Linux NFS client can insert into its nfs_client_id4 id string, to make it both more globally unique, and to ensure that it doesn't change even if the client's nodename changes. If this boot parameter is not specified, the client's nodename is used, as before. Client installation procedures can create a unique string (typically, a UUID) which remains unchanged during the lifetime of that client instance. This works just like creating a UUID for the label of the system's root and boot volumes. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r--fs/nfs/super.c5
1 files changed, 5 insertions, 0 deletions
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;
2662bool nfs4_disable_idmapping = true; 2662bool nfs4_disable_idmapping = true;
2663unsigned short max_session_slots = NFS4_DEF_SLOT_TABLE_SIZE; 2663unsigned short max_session_slots = NFS4_DEF_SLOT_TABLE_SIZE;
2664unsigned short send_implementation_id = 1; 2664unsigned short send_implementation_id = 1;
2665char nfs4_client_id_uniquifier[NFS4_CLIENT_ID_UNIQ_LEN] = "";
2665 2666
2666EXPORT_SYMBOL_GPL(nfs_callback_set_tcpport); 2667EXPORT_SYMBOL_GPL(nfs_callback_set_tcpport);
2667EXPORT_SYMBOL_GPL(nfs_callback_tcpport); 2668EXPORT_SYMBOL_GPL(nfs_callback_tcpport);
@@ -2669,6 +2670,7 @@ EXPORT_SYMBOL_GPL(nfs_idmap_cache_timeout);
2669EXPORT_SYMBOL_GPL(nfs4_disable_idmapping); 2670EXPORT_SYMBOL_GPL(nfs4_disable_idmapping);
2670EXPORT_SYMBOL_GPL(max_session_slots); 2671EXPORT_SYMBOL_GPL(max_session_slots);
2671EXPORT_SYMBOL_GPL(send_implementation_id); 2672EXPORT_SYMBOL_GPL(send_implementation_id);
2673EXPORT_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 = {
2694module_param_named(callback_tcpport, nfs_callback_set_tcpport, portnr, 0644); 2696module_param_named(callback_tcpport, nfs_callback_set_tcpport, portnr, 0644);
2695module_param(nfs_idmap_cache_timeout, int, 0644); 2697module_param(nfs_idmap_cache_timeout, int, 0644);
2696module_param(nfs4_disable_idmapping, bool, 0644); 2698module_param(nfs4_disable_idmapping, bool, 0644);
2699module_param_string(nfs4_unique_id, nfs4_client_id_uniquifier,
2700 NFS4_CLIENT_ID_UNIQ_LEN, 0600);
2697MODULE_PARM_DESC(nfs4_disable_idmapping, 2701MODULE_PARM_DESC(nfs4_disable_idmapping,
2698 "Turn off NFSv4 idmapping when using 'sec=sys'"); 2702 "Turn off NFSv4 idmapping when using 'sec=sys'");
2699module_param(max_session_slots, ushort, 0644); 2703module_param(max_session_slots, ushort, 0644);
@@ -2702,6 +2706,7 @@ MODULE_PARM_DESC(max_session_slots, "Maximum number of outstanding NFSv4.1 "
2702module_param(send_implementation_id, ushort, 0644); 2706module_param(send_implementation_id, ushort, 0644);
2703MODULE_PARM_DESC(send_implementation_id, 2707MODULE_PARM_DESC(send_implementation_id,
2704 "Send implementation ID with NFSv4.1 exchange_id"); 2708 "Send implementation ID with NFSv4.1 exchange_id");
2709MODULE_PARM_DESC(nfs4_unique_id, "nfs_client_id4 uniquifier string");
2705MODULE_ALIAS("nfs4"); 2710MODULE_ALIAS("nfs4");
2706 2711
2707#endif /* CONFIG_NFS_V4 */ 2712#endif /* CONFIG_NFS_V4 */