NFSv4: Schedule recovery if nfs40_walk_client_list() is interrupted
Subsystems (2)
PATCH 1/2 NFSv4: Schedule recovery if nfs40_walk_client_list() is interrupted
If a timeout or a signal interrupts the NFSv4 trunking discovery SETCLIENTID_CONFIRM call, then we don't know whether or not the server has changed the callback identifier on us. Assume that it did, and schedule a 'path down' recovery...
Signed-off-by Trond Myklebust <[email protected]>
--- fs/nfs/nfs4client.c | 7 +++++++ 1 file changed, 7 insertions(+)
fs/nfs/nfs4client.c +7 -0
@@ -531,6 +531,13 @@ int nfs40_walk_client_list(struct nfs_client *new, *result = pos;dprintk ("NFS: <-- %s using nfs_client = %p ({%d})\n" , __func__, pos,atomic_read (&pos->cl_count)); + goto out; +case -ERESTARTSYS : +case -ETIMEDOUT : +/* The callback path may have been inadvertently +* changed. Schedule recovery! +*/ +nfs4_schedule_path_down_recovery (pos);default : goto out; }
Signature · 1 line
1.8.5.3
PATCH 2/2 NFSv4: Ensure we respect soft mount timeouts during trunking discovery
Signed-off-by Trond Myklebust <[email protected]>
--- fs/nfs/nfs4state.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
fs/nfs/nfs4state.c +3 -1
@@ -2075,8 +2075,10 @@ again:switch (status) {case 0 :break ; -case -NFS4ERR_DELAY :case -ETIMEDOUT : +if (clnt->cl_softrtry) +break ; +case -NFS4ERR_DELAY :case -EAGAIN :ssleep (1 );case -NFS4ERR_STALE_CLIENTID :
Signature · 1 line
1.8.5.3
Re: [PATCH 2/2] NFSv4: Ensure we respect soft mount timeouts during trunking discovery
Quoted 1 line · Trond Myklebust
Signed-off-by Trond Myklebust <[email protected]>
Tested-by Steve Dickson <[email protected]>
steved.
Quoted 21 lines
--- fs/nfs/nfs4state.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)fs/nfs/nfs4state.c +3
-1@@ -2075,8 +2075,10 @@ again:switch (status) {case 0 :break ; -case -NFS4ERR_DELAY :case -ETIMEDOUT : +if (clnt->cl_softrtry) +break ; +case -NFS4ERR_DELAY :case -EAGAIN :ssleep (1 );case -NFS4ERR_STALE_CLIENTID :
Quoted 6 lines · Trond Myklebust
If a timeout or a signal interrupts the NFSv4 trunking discovery
SETCLIENTID_CONFIRMcall, then we don't know whether or not the server has changed the callback identifier on us. Assume that it did, and schedule a 'path down' recovery...Signed-off-by Trond Myklebust <[email protected]>
Tested-by Steve Dickson <[email protected]>
steved.
Quoted 23 lines
--- fs/nfs/nfs4client.c | 7 +++++++ 1 file changed, 7 insertions(+)fs/nfs/nfs4client.c +7
-0@@ -531,6 +531,13 @@ int nfs40_walk_client_list(struct nfs_client *new, *result = pos;dprintk ("NFS: <-- %s using nfs_client = %p ({%d})\n" , __func__, pos,atomic_read (&pos->cl_count)); + goto out; +case -ERESTARTSYS : +case -ETIMEDOUT : +/* The callback path may have been inadvertently +* changed. Schedule recovery! +*/ +nfs4_schedule_path_down_recovery (pos);default : goto out; }