diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-11-20 10:53:39 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-11-21 09:29:51 -0500 |
commit | 688a9024e2bc8d07cdc62e287dfb048722cf96df (patch) | |
tree | 4311e6fdbc1a026ceea2199be672477b21e37e94 /fs | |
parent | ae72ae676045274c82f3c25159a9dd7cfcf5ffae (diff) |
NFSv4.1: Adjust CREATE_SESSION arguments when mounting a new filesystem
If we're mounting a new filesystem, ensure that the session has negotiated
large enough request and reply sizes to match the wsize and rsize mount
arguments.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/nfs4proc.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 3e572dc316e4..ee82cdddeebe 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -6037,9 +6037,22 @@ int nfs4_init_session(struct nfs_server *server) | |||
6037 | session->fc_attrs.max_rqst_sz = target_max_rqst_sz; | 6037 | session->fc_attrs.max_rqst_sz = target_max_rqst_sz; |
6038 | session->fc_target_max_resp_sz = target_max_resp_sz; | 6038 | session->fc_target_max_resp_sz = target_max_resp_sz; |
6039 | session->fc_attrs.max_resp_sz = target_max_resp_sz; | 6039 | session->fc_attrs.max_resp_sz = target_max_resp_sz; |
6040 | } else { | ||
6041 | /* Just adjust the targets */ | ||
6042 | if (target_max_rqst_sz > session->fc_target_max_rqst_sz) { | ||
6043 | session->fc_target_max_rqst_sz = target_max_rqst_sz; | ||
6044 | set_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state); | ||
6045 | } | ||
6046 | if (target_max_resp_sz > session->fc_target_max_resp_sz) { | ||
6047 | session->fc_target_max_resp_sz = target_max_resp_sz; | ||
6048 | set_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state); | ||
6049 | } | ||
6040 | } | 6050 | } |
6041 | spin_unlock(&clp->cl_lock); | 6051 | spin_unlock(&clp->cl_lock); |
6042 | 6052 | ||
6053 | if (test_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state)) | ||
6054 | nfs4_schedule_lease_recovery(clp); | ||
6055 | |||
6043 | return nfs41_check_session_ready(clp); | 6056 | return nfs41_check_session_ready(clp); |
6044 | } | 6057 | } |
6045 | 6058 | ||