Skip to contentSkip to conversation

NFS: Don't restart release lockowner RPC if getting expired error

PATCH Kinglong Mee 1 participant 2 messages Aug 3, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Fix Commit 60ea681299 (NFS: Migration support for RELEASE_LOCKOWNER) If getting expired error, client will enter a infinite loop as,

client server
RELEASE_LOCKOWNER(old clid) ----->
<--- expired error
RENEW(old clid) ----->
<--- expired error
SETCLIENTID ----->

                <--- a new clid
   SETCLIENTID_CONFIRM (new clid) -->
                <--- ok
   RELEASE_LOCKOWNER(old clid) ----->
                <--- expired error
   RENEW(new clid)             ----->
                <-- ok
   RELEASE_LOCKOWNER(old clid) ----->
                <--- expired error
   RENEW(new clid)             ----->
                <-- ok
                ... ...

This patch just handle the expired error to register clientid, but not restart a release lockowner RPC.

---
 fs/nfs/nfs4proc.c | 2 ++
 1 file changed, 2 insertions(+)
fs/nfs/nfs4proc.c +2 -0
index 285ad53..902aadf 100644
@@ -5852,6 +5852,8 @@ static void nfs4_release_lockowner_done(struct rpc_task *task, void *calldata)
 		break;
 	case -NFS4ERR_STALE_CLIENTID:
 	case -NFS4ERR_EXPIRED:
+		nfs4_async_handle_error(task, server, NULL);
+		break;
 	case -NFS4ERR_LEASE_MOVED:
 	case -NFS4ERR_DELAY:
 		if (nfs4_async_handle_error(task, server, NULL) == -EAGAIN)
Signature · 1 line
1.9.3
#1 lore raw

Please ignore this version, I found some problems of it. A new patch will be send later.

thanks,
Kinglong Mee

Quoted 44 lines · Kinglong Mee

Fix Commit 60ea681299 (NFS: Migration support for RELEASE_LOCKOWNER) If getting expired error, client will enter a infinite loop as,

client server
RELEASE_LOCKOWNER(old clid) ----->
<--- expired error
RENEW(old clid) ----->
<--- expired error
SETCLIENTID ----->

                <--- a new clid
   SETCLIENTID_CONFIRM (new clid) -->
                <--- ok
   RELEASE_LOCKOWNER(old clid) ----->
                <--- expired error
   RENEW(new clid)             ----->
                <-- ok
   RELEASE_LOCKOWNER(old clid) ----->
                <--- expired error
   RENEW(new clid)             ----->
                <-- ok
                ... ...

This patch just handle the expired error to register clientid, but not restart a release lockowner RPC.

---
 fs/nfs/nfs4proc.c | 2 ++
 1 file changed, 2 insertions(+)
fs/nfs/nfs4proc.c +2 -0
index 285ad53..902aadf 100644
@@ -5852,6 +5852,8 @@ static void nfs4_release_lockowner_done(struct rpc_task *task, void *calldata)
 		break;
 	case -NFS4ERR_STALE_CLIENTID:
 	case -NFS4ERR_EXPIRED:
+		nfs4_async_handle_error(task, server, NULL);
+		break;
 	case -NFS4ERR_LEASE_MOVED:
 	case -NFS4ERR_DELAY:
 		if (nfs4_async_handle_error(task, server, NULL) == -EAGAIN)