NFSv4: Schedule recovery if nfs40_walk_client_list() is interrupted
authorTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 18 Mar 2014 18:11:24 +0000 (14:11 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Wed, 19 Mar 2014 12:34:20 +0000 (08:34 -0400)
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...

Tested-by: Steve Dickson <steved@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/nfs4client.c

index 0e46d3d..aa9ef48 100644 (file)
@@ -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;
                }