OSDN Git Service

sunrpc: Fix connect metrics
authorChuck Lever <chuck.lever@oracle.com>
Mon, 1 Oct 2018 18:25:36 +0000 (14:25 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 2 Oct 2018 20:08:12 +0000 (16:08 -0400)
commit3968a8a5310404c2f0b9e4d9f28cab13a12bc4fd
tree58962b248638724060e33544ecaa43c853a65ceb
parentd379eaa838f1813ca906b946ad3cbb77781d2be7
sunrpc: Fix connect metrics

For TCP, the logic in xprt_connect_status is currently never invoked
to record a successful connection. Commit 2a4919919a97 ("SUNRPC:
Return EAGAIN instead of ENOTCONN when waking up xprt->pending")
changed the way TCP xprt's are awoken after a connect succeeds.

Instead, change connection-oriented transports to bump connect_count
and compute connect_time the moment that XPRT_CONNECTED is set.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprt.c
net/sunrpc/xprtrdma/transport.c
net/sunrpc/xprtsock.c