linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* NFS: Don't restart release lockowner RPC if getting expired error
@ 2014-08-03 14:50 Kinglong Mee
  2014-08-03 15:23 ` Kinglong Mee
  0 siblings, 1 reply; 2+ messages in thread
From: Kinglong Mee @ 2014-08-03 14:50 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: Chuck Lever, Linux NFS Mailing List, kinglongmee

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.

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
---
 fs/nfs/nfs4proc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 285ad53..902aadf 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -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)
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: NFS: Don't restart release lockowner RPC if getting expired error
  2014-08-03 14:50 NFS: Don't restart release lockowner RPC if getting expired error Kinglong Mee
@ 2014-08-03 15:23 ` Kinglong Mee
  0 siblings, 0 replies; 2+ messages in thread
From: Kinglong Mee @ 2014-08-03 15:23 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: Chuck Lever, Linux NFS Mailing List

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

thanks,
Kinglong Mee

On 8/3/2014 22:50, Kinglong Mee wrote:
> 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.
> 
> Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
> ---
>  fs/nfs/nfs4proc.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
> index 285ad53..902aadf 100644
> --- a/fs/nfs/nfs4proc.c
> +++ b/fs/nfs/nfs4proc.c
> @@ -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)
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-03 15:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-03 14:50 NFS: Don't restart release lockowner RPC if getting expired error Kinglong Mee
2014-08-03 15:23 ` Kinglong Mee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).