K 10 svn:author V 8 rmacklem K 8 svn:date V 27 2021-10-19T03:50:03.298099Z K 7 svn:log V 1096 nfscl: Fix another deadlock related to the NFSv4 clientID lock Without this patch, it is possible to hang the NFSv4 client, when a rename/remove is being done on a file where the client holds a delegation, if pNFS is being used. For a delegation to be returned, dirty data blocks must be flushed to the NFSv4 server. When pNFS is in use, a shared lock on the clientID must be acquired while doing a write to the DS(s). However, if rename/remove is doing the delegation return an exclusive lock will be acquired on the clientID, preventing the write to the DS(s) from acquiring a shared lock on the clientID. This patch stops rename/remove from doing a delegation return if pNFS is enabled. Since doing delegation return in the same compound as rename/remove is only an optimization, not doing so should not cause problems. This problem was detected during a recent NFSv4 interoperability testing event held by the IETF working group. (cherry picked from commit b82168e657d378ff86ea18c4f03b98aac9ee9bb3) Git Hash: 75d71cf8df8c83b2b2bc3a16ef66a540a2ebac70 Git Author: rmacklem@FreeBSD.org END