aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2008-12-23 15:21:36 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-12-23 15:21:36 -0500
commit542fcc334adfea36d407cbf698d549fcb2bf6b91 (patch)
tree353198c6639f7350d014cde23f495f2bf2b13aed /fs/nfs
parent4a01b8a4ee7b12becd26a49bae57f019605658cd (diff)
NFS: move nfs_server flag initialization
Make it possible for the NFSv4 mount set up logic to pass mount option flags down the stack to nfs_create_rpc_client(). This is immediately useful if we want NFS mount options to modulate settings of the underlying RPC transport, but it may be useful at some later point if other parts of the NFSv4 mount initialization logic want to know what the mount options are. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/client.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index d11cdaafb39a..27190337fc13 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -1063,6 +1063,10 @@ static int nfs4_init_server(struct nfs_server *server,
1063 nfs_init_timeout_values(&timeparms, data->nfs_server.protocol, 1063 nfs_init_timeout_values(&timeparms, data->nfs_server.protocol,
1064 data->timeo, data->retrans); 1064 data->timeo, data->retrans);
1065 1065
1066 /* Initialise the client representation from the mount data */
1067 server->flags = data->flags;
1068 server->caps |= NFS_CAP_ATOMIC_OPEN;
1069
1066 /* Get a client record */ 1070 /* Get a client record */
1067 error = nfs4_set_client(server, 1071 error = nfs4_set_client(server,
1068 data->nfs_server.hostname, 1072 data->nfs_server.hostname,
@@ -1075,10 +1079,6 @@ static int nfs4_init_server(struct nfs_server *server,
1075 if (error < 0) 1079 if (error < 0)
1076 goto error; 1080 goto error;
1077 1081
1078 /* Initialise the client representation from the mount data */
1079 server->flags = data->flags;
1080 server->caps |= NFS_CAP_ATOMIC_OPEN;
1081
1082 if (data->rsize) 1082 if (data->rsize)
1083 server->rsize = nfs_block_size(data->rsize, NULL); 1083 server->rsize = nfs_block_size(data->rsize, NULL);
1084 if (data->wsize) 1084 if (data->wsize)
@@ -1181,6 +1181,10 @@ struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data,
1181 parent_server = NFS_SB(data->sb); 1181 parent_server = NFS_SB(data->sb);
1182 parent_client = parent_server->nfs_client; 1182 parent_client = parent_server->nfs_client;
1183 1183
1184 /* Initialise the client representation from the parent server */
1185 nfs_server_copy_userdata(server, parent_server);
1186 server->caps |= NFS_CAP_ATOMIC_OPEN;
1187
1184 /* Get a client representation. 1188 /* Get a client representation.
1185 * Note: NFSv4 always uses TCP, */ 1189 * Note: NFSv4 always uses TCP, */
1186 error = nfs4_set_client(server, data->hostname, 1190 error = nfs4_set_client(server, data->hostname,
@@ -1193,10 +1197,6 @@ struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data,
1193 if (error < 0) 1197 if (error < 0)
1194 goto error; 1198 goto error;
1195 1199
1196 /* Initialise the client representation from the parent server */
1197 nfs_server_copy_userdata(server, parent_server);
1198 server->caps |= NFS_CAP_ATOMIC_OPEN;
1199
1200 error = nfs_init_server_rpcclient(server, parent_server->client->cl_timeout, data->authflavor); 1200 error = nfs_init_server_rpcclient(server, parent_server->client->cl_timeout, data->authflavor);
1201 if (error < 0) 1201 if (error < 0)
1202 goto error; 1202 goto error;