]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Shut down the TCP connection to a DS in the pNFS client when Renew fails.
authorRick Macklem <rmacklem@FreeBSD.org>
Sun, 15 Jul 2018 18:54:44 +0000 (18:54 +0000)
committerRick Macklem <rmacklem@FreeBSD.org>
Sun, 15 Jul 2018 18:54:44 +0000 (18:54 +0000)
commit5da3882447c722f6be6362d08f62c21de9779f26
tree5a9329c46464d8591ed4bd793f6c2137fcd9b509
parentba06b626d16a572d0f39cbf13345d4683c924866
Shut down the TCP connection to a DS in the pNFS client when Renew fails.

When a NFSv4.1 client mount using pNFS detects a failure trying to do a
Renew (actually just a Sequence operation), the code would simply try
again and again and again every 30sec.
This would tie up the "nfscl" thread, which should also be doing other
things like Renews on other DSs and the MDS.
This patch adds code which closes down the TCP connection and marks it
defunct when Renew detects an failure to communicate with the DS, so
further Renews will not be attempted until a new working TCP connection to
the DS is established.
It also makes the call to nfscl_cancelreqs() unconditional, since
nfscl_cancelreqs() checks the NFSCLDS_SAMECONN flag and does so while holding
the lock.
This fix only applies to the NFSv4.1 client whne using pNFS and without it
the only effect would have been an "nfscl" thread busy doing Renew attempts
on an unresponsive DS.

MFC after: 2 weeks
sys/fs/nfs/nfs_var.h
sys/fs/nfsclient/nfs_clrpcops.c
sys/fs/nfsclient/nfs_clstate.c