[pnfs] [PATCH] no putrootfh or getattr to DS

Marc Eshel eshel at almaden.ibm.com
Fri Jul 27 19:54:36 EDT 2007


From: Marc Eshel <eshel at almaden.ibm.com>

Remove get_lease_time call when setting client for DS connection.
This call was doing PUTROOTFH + GETATTR to the DS which is not allowed.
---

 fs/nfs/nfs4proc.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 0a568a4..2f2a257 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -5739,11 +5739,15 @@ int nfs41_proc_setup_session(struct nfs4
 	clp->cl_session->expired = 0;
 	clp->cl_session->client = clp;
 
-	status = nfs4_proc_get_lease_time(clp, &fsinfo);
+        if (!(clp->cl_exchange_flags & EXCHGID4_FLAG_USE_PNFS_DS)) {
+		status = nfs4_proc_get_lease_time(clp, &fsinfo);
+
+		if (status)
+			goto out_free;
+	}
+	else
+		fsinfo.lease_time = 30; // do we need lease time on DS ???
 
-	if (status) 
-		goto out_free;
-	
 	/* Update lease time and schedule renewal */
 	spin_lock(&clp->cl_lock);
 	clp->cl_lease_time = fsinfo.lease_time * HZ;


More information about the pNFS mailing list