aboutsummaryrefslogtreecommitdiff
path: root/fs/nfs
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2008-03-14 14:10:30 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-03-19 18:00:22 -0400
commit3f8400d1f1f9d5fb175bdbf6236e564dde454f28 (patch)
treec5a15b86b049c60367ee525a05a4bc76d0a3b825 /fs/nfs
parentf22d6d79fe227245363a8849ea8c85fe6c6598c3 (diff)
NFS: Save the values of the "mount*=" mount options
Save the value of the mountproto= mountport= mountvers= and mountaddr= options so that these values can be displayed later via nfs_show_options(). This preserves the intent of the original mount options, should the file system need to be remounted based on what's displayed in /proc/mounts. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/client.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 874018113d0..93dfd75aba7 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -688,6 +688,16 @@ static int nfs_init_server(struct nfs_server *server,
if (error < 0)
goto error;
+ /* Preserve the values of mount_server-related mount options */
+ if (data->mount_server.addrlen) {
+ memcpy(&server->mountd_address, &data->mount_server.address,
+ data->mount_server.addrlen);
+ server->mountd_addrlen = data->mount_server.addrlen;
+ }
+ server->mountd_version = data->mount_server.version;
+ server->mountd_port = data->mount_server.port;
+ server->mountd_protocol = data->mount_server.protocol;
+
server->namelen = data->namlen;
/* Create a client RPC handle for the NFSv3 ACL management interface */
nfs_init_server_aclclient(server);