aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/client.c
diff options
context:
space:
mode:
authorBenny Halevy <bhalevy@panasas.com>2009-04-01 09:22:50 -0400
committerBenny Halevy <bhalevy@panasas.com>2009-06-17 15:25:13 -0400
commit008f55d0e019943323c20a03493a2ba5672a4cc8 (patch)
tree9d23ac89a198b307fa39018a228bd365e72a40d2 /fs/nfs/client.c
parentb4b82607ffcf09b57301846d154f2c09c0b807c0 (diff)
nfs41: recover lease in _nfs4_lookup_root
This creates the nfsv4.1 session on mount. Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/client.c')
-rw-r--r--fs/nfs/client.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index d28a987f569e..3e232bf56dfb 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -528,6 +528,22 @@ void nfs_mark_client_ready(struct nfs_client *clp, int state)
528} 528}
529 529
530/* 530/*
531 * With sessions, the client is not marked ready until after a
532 * successful EXCHANGE_ID and CREATE_SESSION.
533 *
534 * Map errors cl_cons_state errors to EPROTONOSUPPORT to indicate
535 * other versions of NFS can be tried.
536 */
537int nfs4_check_client_ready(struct nfs_client *clp)
538{
539 if (!nfs4_has_session(clp))
540 return 0;
541 if (clp->cl_cons_state < NFS_CS_READY)
542 return -EPROTONOSUPPORT;
543 return 0;
544}
545
546/*
531 * Initialise the timeout values for a connection 547 * Initialise the timeout values for a connection
532 */ 548 */
533static void nfs_init_timeout_values(struct rpc_timeout *to, int proto, 549static void nfs_init_timeout_values(struct rpc_timeout *to, int proto,