]> git.decadent.org.uk Git - nfs-utils.git/commit - utils/statd/sm-notify.c
sm-notify: Avoid extra rpcbind queries
authorChuck Lever <chuck.lever@oracle.com>
Mon, 19 Sep 2011 18:20:25 +0000 (14:20 -0400)
committerLuk Claes <luk@debian.org>
Sun, 2 Oct 2011 14:16:48 +0000 (16:16 +0200)
commitd20a639eb3c57b0bc71e6effe8db6d4bcb285bf8
tree3b0ccf0b43ff0e67b97f89b9a63fa4f7a5408fb3
parent24a3291682a316cae8998319d25e81fa4cc609ff
sm-notify: Avoid extra rpcbind queries

The logic in notify_host() watches the host->retries counter to see if
progress is not being made.  If progress stalls, notify_host() tries
another IP address.  This means sm-notify will generate a fresh
rpcbind query.

After an RPC succeeds, be sure to reset host->retries so sm-notify
doesn't start walking down the host's addrinfo list when we _are_
making progress.  In the common case, if the host responds, we avoid
extra rpcbind queries and send all requests for the host to the same
IP address.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
utils/statd/sm-notify.c