Commit 0f5f49b8 authored by Weston Andros Adamson's avatar Weston Andros Adamson Committed by Trond Myklebust

NFS: cache parsed auth_info in nfs_server

Cache the auth_info structure in nfs_server and pass these values to submounts.

This lays the groundwork for supporting multiple sec= options.
Signed-off-by: default avatarWeston Andros Adamson <dros@netapp.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent a3f73c27
...@@ -786,6 +786,7 @@ static int nfs_init_server(struct nfs_server *server, ...@@ -786,6 +786,7 @@ static int nfs_init_server(struct nfs_server *server,
goto error; goto error;
server->port = data->nfs_server.port; server->port = data->nfs_server.port;
server->auth_info = data->auth_info;
error = nfs_init_server_rpcclient(server, &timeparms, error = nfs_init_server_rpcclient(server, &timeparms,
data->selected_flavor); data->selected_flavor);
...@@ -929,6 +930,7 @@ void nfs_server_copy_userdata(struct nfs_server *target, struct nfs_server *sour ...@@ -929,6 +930,7 @@ void nfs_server_copy_userdata(struct nfs_server *target, struct nfs_server *sour
target->acdirmax = source->acdirmax; target->acdirmax = source->acdirmax;
target->caps = source->caps; target->caps = source->caps;
target->options = source->options; target->options = source->options;
target->auth_info = source->auth_info;
} }
EXPORT_SYMBOL_GPL(nfs_server_copy_userdata); EXPORT_SYMBOL_GPL(nfs_server_copy_userdata);
......
...@@ -962,6 +962,7 @@ static int nfs4_init_server(struct nfs_server *server, ...@@ -962,6 +962,7 @@ static int nfs4_init_server(struct nfs_server *server,
/* Initialise the client representation from the mount data */ /* Initialise the client representation from the mount data */
server->flags = data->flags; server->flags = data->flags;
server->options = data->options; server->options = data->options;
server->auth_info = data->auth_info;
if (data->auth_info.flavor_len >= 1) if (data->auth_info.flavor_len >= 1)
data->selected_flavor = data->auth_info.flavors[0]; data->selected_flavor = data->auth_info.flavors[0];
......
...@@ -2187,8 +2187,7 @@ nfs_remount(struct super_block *sb, int *flags, char *raw_data) ...@@ -2187,8 +2187,7 @@ nfs_remount(struct super_block *sb, int *flags, char *raw_data)
data->wsize = nfss->wsize; data->wsize = nfss->wsize;
data->retrans = nfss->client->cl_timeout->to_retries; data->retrans = nfss->client->cl_timeout->to_retries;
data->selected_flavor = nfss->client->cl_auth->au_flavor; data->selected_flavor = nfss->client->cl_auth->au_flavor;
data->auth_info.flavors[0] = nfss->client->cl_auth->au_flavor; data->auth_info = nfss->auth_info;
data->auth_info.flavor_len = 1;
data->acregmin = nfss->acregmin / HZ; data->acregmin = nfss->acregmin / HZ;
data->acregmax = nfss->acregmax / HZ; data->acregmax = nfss->acregmax / HZ;
data->acdirmin = nfss->acdirmin / HZ; data->acdirmin = nfss->acdirmin / HZ;
......
...@@ -151,6 +151,7 @@ struct nfs_server { ...@@ -151,6 +151,7 @@ struct nfs_server {
unsigned long mount_time; /* when this fs was mounted */ unsigned long mount_time; /* when this fs was mounted */
struct super_block *super; /* VFS super block */ struct super_block *super; /* VFS super block */
dev_t s_dev; /* superblock dev numbers */ dev_t s_dev; /* superblock dev numbers */
struct nfs_auth_info auth_info; /* parsed auth flavors */
#ifdef CONFIG_NFS_FSCACHE #ifdef CONFIG_NFS_FSCACHE
struct nfs_fscache_key *fscache_key; /* unique key for superblock */ struct nfs_fscache_key *fscache_key; /* unique key for superblock */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment