Convert all of them to tsleep_nsec(9), ok?
Index: nfs/nfs_aiod.c
===================================================================
RCS file: /cvs/src/sys/nfs/nfs_aiod.c,v
retrieving revision 1.7
diff -u -p -r1.7 nfs_aiod.c
--- nfs/nfs_aiod.c 28 Aug 2015 00:03:54 -0000 1.7
+++ nfs/nfs_aiod.c 2 Dec 2019 14:04:19 -0000
@@ -112,7 +112,7 @@ loop: /* Loop around until SIGKILL */
}
while (!(aiod->nad_flags & NFSAIOD_WAKEUP))
- tsleep(aiod, PWAIT, "aiodidle", 0);
+ tsleep_nsec(aiod, PWAIT, "aiodidle", INFSLP);
/*
* Wakeup for this aiod happens in one of the following
Index: nfs/nfs_kq.c
===================================================================
RCS file: /cvs/src/sys/nfs/nfs_kq.c,v
retrieving revision 1.25
diff -u -p -r1.25 nfs_kq.c
--- nfs/nfs_kq.c 5 Aug 2019 08:35:59 -0000 1.25
+++ nfs/nfs_kq.c 2 Dec 2019 14:05:36 -0000
@@ -193,7 +193,7 @@ filt_nfsdetach(struct knote *kn)
while (ke->flags & KEVQ_BUSY) {
ke->flags |= KEVQ_WANT;
rw_exit_write(&nfskevq_lock);
- (void) tsleep(ke, PSOCK, "nfskqdet", 0);
+ tsleep_nsec(ke, PSOCK, "nfskqdet", INFSLP);
rw_enter_write(&nfskevq_lock);
}
Index: nfs/nfs_socket.c
===================================================================
RCS file: /cvs/src/sys/nfs/nfs_socket.c,v
retrieving revision 1.133
diff -u -p -r1.133 nfs_socket.c
--- nfs/nfs_socket.c 13 May 2019 19:21:31 -0000 1.133
+++ nfs/nfs_socket.c 2 Dec 2019 14:06:18 -0000
@@ -407,7 +407,7 @@ nfs_reconnect(struct nfsreq *rep)
while ((error = nfs_connect(nmp, rep)) != 0) {
if (error == EINTR || error == ERESTART)
return (EINTR);
- (void)tsleep((caddr_t)&lbolt, PSOCK, "nfsrecon", 0);
+ tsleep_nsec(&lbolt, PSOCK, "nfsrecon", INFSLP);
}
/*
Index: nfs/nfs_srvcache.c
===================================================================
RCS file: /cvs/src/sys/nfs/nfs_srvcache.c,v
retrieving revision 1.28
diff -u -p -r1.28 nfs_srvcache.c
--- nfs/nfs_srvcache.c 28 Aug 2015 00:03:54 -0000 1.28
+++ nfs/nfs_srvcache.c 2 Dec 2019 14:06:01 -0000
@@ -183,7 +183,7 @@ nfsrv_getcache(struct nfsrv_descript *nd
rp = TAILQ_FIRST(&nfsrvlruhead);
while ((rp->rc_flag & RC_LOCKED) != 0) {
rp->rc_flag |= RC_WANTED;
- tsleep(rp, PZERO-1, "nfsrc", 0);
+ tsleep_nsec(rp, PZERO-1, "nfsrc", INFSLP);
rp = TAILQ_FIRST(&nfsrvlruhead);
}
rp->rc_flag |= RC_LOCKED;
@@ -285,7 +285,7 @@ loop:
netaddr_match(NETFAMILY(rp), &rp->rc_haddr, nd->nd_nam)) {
if ((rp->rc_flag & RC_LOCKED)) {
rp->rc_flag |= RC_WANTED;
- tsleep(rp, PZERO - 1, "nfsrc", 0);
+ tsleep_nsec(rp, PZERO - 1, "nfsrc", INFSLP);
goto loop;
}
rp->rc_flag |= RC_LOCKED;
Index: nfs/nfs_syscalls.c
===================================================================
RCS file: /cvs/src/sys/nfs/nfs_syscalls.c,v
retrieving revision 1.114
diff -u -p -r1.114 nfs_syscalls.c
--- nfs/nfs_syscalls.c 6 Jun 2018 06:55:22 -0000 1.114
+++ nfs/nfs_syscalls.c 2 Dec 2019 14:07:21 -0000
@@ -165,7 +165,7 @@ sys_nfssvc(struct proc *p, void *v, regi
while (nfssvc_sockhead_flag & SLP_INIT) {
nfssvc_sockhead_flag |= SLP_WANTINIT;
- tsleep(&nfssvc_sockhead, PSOCK, "nfsd init", 0);
+ tsleep_nsec(&nfssvc_sockhead, PSOCK, "nfsd init", INFSLP);
}
switch (flags) {
@@ -604,8 +604,8 @@ nfssvc_iod(void *arg)
/* Just loop around doin our stuff until SIGKILL. */
for (;;) {
while (TAILQ_FIRST(&nfs_bufq) == NULL && error == 0) {
- error = tsleep(&nfs_bufq,
- PWAIT | PCATCH, "nfsidl", 0);
+ error = tsleep_nsec(&nfs_bufq,
+ PWAIT | PCATCH, "nfsidl", INFSLP);
}
while ((bp = TAILQ_FIRST(&nfs_bufq)) != NULL) {
/* Take one off the front of the list */
@@ -702,7 +702,7 @@ again:
(nfsd_head_flag & NFSD_CHECKSLP) == 0) {
nfsd->nfsd_flag |= NFSD_WAITING;
nfsd_waiting++;
- error = tsleep(nfsd, PSOCK | PCATCH, "nfsd", 0);
+ error = tsleep_nsec(nfsd, PSOCK | PCATCH, "nfsd", INFSLP);
nfsd_waiting--;
if (error)
return (error);