SUNRPC: Retry bad rpcbind replies
authorChuck Lever <chuck.lever@oracle.com>
Tue, 11 Sep 2007 22:00:36 +0000 (18:00 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 9 Oct 2007 21:16:51 +0000 (17:16 -0400)
When a server returns a bad rpcbind reply, make rpcbind client recovery logic
retry with an older protocol version.  Older versions are more likely to work
correctly.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
net/sunrpc/rpcb_clnt.c

index 34738c5..a0c9f69 100644 (file)
@@ -446,6 +446,10 @@ static void rpcb_getport_done(struct rpc_task *child, void *data)
        struct rpc_xprt *xprt = map->r_xprt;
        int status = child->tk_status;
 
+       /* Garbage reply: retry with a lesser rpcbind version */
+       if (status == -EIO)
+               status = -EPROTONOSUPPORT;
+
        /* rpcbind server doesn't support this rpcbind protocol version */
        if (status == -EPROTONOSUPPORT)
                xprt->bind_index++;