Commit 688a9024 authored by Trond Myklebust's avatar Trond Myklebust

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: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent ae72ae67
......@@ -6037,9 +6037,22 @@ int nfs4_init_session(struct nfs_server *server)
session->fc_attrs.max_rqst_sz = target_max_rqst_sz;
session->fc_target_max_resp_sz = target_max_resp_sz;
session->fc_attrs.max_resp_sz = target_max_resp_sz;
} else {
/* Just adjust the targets */
if (target_max_rqst_sz > session->fc_target_max_rqst_sz) {
session->fc_target_max_rqst_sz = target_max_rqst_sz;
set_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state);
}
if (target_max_resp_sz > session->fc_target_max_resp_sz) {
session->fc_target_max_resp_sz = target_max_resp_sz;
set_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state);
}
}
spin_unlock(&clp->cl_lock);
if (test_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state))
nfs4_schedule_lease_recovery(clp);
return nfs41_check_session_ready(clp);
}
......
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