[pnfs] [PATCH 01/29] nfs41: WORKAROUND: turn off state renewal

Benny Halevy bhalevy at panasas.com
Fri Dec 28 03:44:03 EST 2007


From: Andy Adamson <andros at umich.edu>

The NFSv4.1 sched_state_renewal function nfs41_proc_async_sequence() fails
to set any fields in the struct nfs41_sequence_res which means that
nfs41_sequence_done() has a garbage slot (slot = res->sr_slot), and causes a
seg fault.

Futhermore, the credential for state renewal is obtained by
nfs4_get_renew_cred() which looks for an open state credential. This will fail
for exchange_id, create_session, etc...

Fortunately, the session state recovery code works!

Turn off NFSv4.1 state renewal until fixed.

Signed-off-by: Andy Adamson<andros at umich.edu>
Signed-off-by: Benny Halevy <bhalevy at panasas.com>
---
 fs/nfs/nfs4renewd.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/nfs4renewd.c b/fs/nfs/nfs4renewd.c
index 69cc8ca..c1e000e 100644
--- a/fs/nfs/nfs4renewd.c
+++ b/fs/nfs/nfs4renewd.c
@@ -81,7 +81,13 @@ nfs4_renew_state(struct work_struct *work)
 	timeout = (2 * lease) / 3 + (long)last - (long)now;
 	/* Are we close to a lease timeout? */
 	if (time_after(now, last + lease/3)) {
+#if defined(CONFIG_NFS_V4_1)
+		dprintk("%s NO STATE RENEWAL: ops->sched_state_renewal() "
+			"not implemented\n", __func__);
+		cred = NULL;
+#else /* CONFIG_NFS_V4_1 */
 		cred = nfs4_get_renew_cred(clp);
+#endif /* CONFIG_NFS_V4_1 */
 		if (cred == NULL) {
 			set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state);
 			spin_unlock(&clp->cl_lock);
-- 
1.5.3.3



More information about the pNFS mailing list