aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2009-04-01 09:22:33 -0400
committerBenny Halevy <bhalevy@panasas.com>2009-06-17 15:24:53 -0400
commit96b09e024fedf0a6604c8c688a3994d5ed991434 (patch)
tree850daa16069a9d1729c53b26f27926f3e90a9da3 /fs
parent8d35301d7db4165f2430c428865f7b0add47615d (diff)
nfs41: use session attributes for rsize and wsize
Set the mount points rsize and wsize to the negotiated session fore channel maximum response and requeset size. These values will be bound checked in nfs_server_set_fsinfo. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com> [move nfs4_session_set_rwsize into CONFIG_NFS_V4] Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/client.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index a9828baaa445..bb7432d83b5a 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -1207,6 +1207,21 @@ static void nfs4_init_session(struct nfs_client *clp,
1207} 1207}
1208 1208
1209/* 1209/*
1210 * Session has been established, and the client marked ready.
1211 * Set the mount rsize and wsize with negotiated fore channel
1212 * attributes which will be bound checked in nfs_server_set_fsinfo.
1213 */
1214static void nfs4_session_set_rwsize(struct nfs_server *server)
1215{
1216#ifdef CONFIG_NFS_V4_1
1217 if (!nfs4_has_session(server->nfs_client))
1218 return;
1219 server->rsize = server->nfs_client->cl_session->fc_attrs.max_resp_sz;
1220 server->wsize = server->nfs_client->cl_session->fc_attrs.max_rqst_sz;
1221#endif /* CONFIG_NFS_V4_1 */
1222}
1223
1224/*
1210 * Create a version 4 volume record 1225 * Create a version 4 volume record
1211 */ 1226 */
1212static int nfs4_init_server(struct nfs_server *server, 1227static int nfs4_init_server(struct nfs_server *server,
@@ -1296,6 +1311,8 @@ struct nfs_server *nfs4_create_server(const struct nfs_parsed_mount_data *data,
1296 (unsigned long long) server->fsid.minor); 1311 (unsigned long long) server->fsid.minor);
1297 dprintk("Mount FH: %d\n", mntfh->size); 1312 dprintk("Mount FH: %d\n", mntfh->size);
1298 1313
1314 nfs4_session_set_rwsize(server);
1315
1299 error = nfs_probe_fsinfo(server, mntfh, &fattr); 1316 error = nfs_probe_fsinfo(server, mntfh, &fattr);
1300 if (error < 0) 1317 if (error < 0)
1301 goto error; 1318 goto error;