SUNRPC: Detect immediate closure of accepted sockets
authorTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 26 Jul 2016 13:51:20 +0000 (09:51 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 1 Aug 2016 21:53:42 +0000 (17:53 -0400)
This modification is useful for debugging issues that happen while
the socket is being initialised.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
net/sunrpc/svcsock.c

index a11ddc8..57625f6 100644 (file)
@@ -1360,8 +1360,11 @@ static struct svc_sock *svc_setup_socket(struct svc_serv *serv,
        else
                svc_tcp_init(svsk, serv);
 
-       dprintk("svc: svc_setup_socket created %p (inet %p)\n",
-                               svsk, svsk->sk_sk);
+       dprintk("svc: svc_setup_socket created %p (inet %p), "
+                       "listen %d close %d\n",
+                       svsk, svsk->sk_sk,
+                       test_bit(XPT_LISTENER, &svsk->sk_xprt.xpt_flags),
+                       test_bit(XPT_CLOSE, &svsk->sk_xprt.xpt_flags));
 
        return svsk;
 }