K 10 svn:author V 8 rmacklem K 8 svn:date V 27 2021-04-11T22:39:30.116562Z K 7 svn:log V 1111 nfsv4 client: fix forced dismount when sleeping in the renew thread During a recent NFSv4 testing event a test server caused a hang where "umount -N" failed. The renew thread was sleeping on "nfsv4lck" and the "umount" was sleeping, waiting for the renew thread to terminate. This is the second of two patches that is hoped to fix the renew thread so that it will terminate when "umount -N" is done on the mount. This patch adds a 5second timeout on the msleep()s and checks for the forced dismount flag so that the renew thread will wake up and see the forced dismount flag. Normally a wakeup() will occur in less than 5seconds, but if a premature return from msleep() does occur, it will simply loop around and msleep() again. The patch also adds the "mp" argument to nfsv4_lock() so that it will return when the forced dismount flag is set. While here, replace the nfsmsleep() wrapper that was used for portability with the actual msleep() call. (cherry picked from commit 82ee386c2afb42388804c1189751b83048953433) Git Hash: e18f9de0612137924951a0ec709eb36286bb3894 Git Author: rmacklem@FreeBSD.org END