[pnfs] [PATCH 11/11] nfs41: state reclaimer renew lease error handling
andros at netapp.com
andros at netapp.com
Fri Jul 11 10:39:18 EDT 2008
From: Andy Adamson <andros at netapp.com>
The state reclaimer has been called due to a NFS4_STALE_CLIENTID or NFS4_EXPIRE
error. First it tries to renew the old lease (network partion case) which for
v4.1 means an nfs4_proc_sequence call. Any error from the sequence operation
means that the lease cannot be renewed.
Switch on the minorversion to handle the error return from the renew lease call.
Signed-off-by: Andy Adamson<andros at netapp.com>
---
fs/nfs/nfs4state.c | 22 ++++++++++++++++------
1 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 739e81e..fd30409 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -992,13 +992,23 @@ restart_loop:
/* Yes there are: try to renew the old lease */
status = ops->renew_lease(clp, cred);
put_rpccred(cred);
- switch (status) {
+ switch (clp->cl_minorversion) {
case 0:
- case -NFS4ERR_CB_PATH_DOWN:
- goto out;
- case -NFS4ERR_STALE_CLIENTID:
- case -NFS4ERR_LEASE_MOVED:
- ops = nfs4_reboot_recovery_ops[clp->cl_minorversion];
+ switch (status) {
+ case 0:
+ case -NFS4ERR_CB_PATH_DOWN:
+ goto out;
+ case -NFS4ERR_STALE_CLIENTID:
+ case -NFS4ERR_LEASE_MOVED:
+ ops = nfs4_reboot_recovery_ops[0];
+ }
+ case 1:
+ switch (status) {
+ case 0:
+ goto out;
+ default:
+ ops = nfs4_reboot_recovery_ops[1];
+ }
}
} else {
/* "reboot" to ensure we clear all state on the server */
--
1.5.4.1
More information about the pNFS
mailing list