summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2019-12-08 12:29:43 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2019-12-08 12:29:43 +0000
commit033d2cf5c10dc4f6b7cf049ca52d11159809fc9b (patch)
treebaadf8873ce528e8b6da26889a69ac8f94001ac0
parent144122e012eadbcd0af3be40074922b66096dbe1 (diff)
Convert infinite sleeps to tsleep_nsec(9).
ok visa@, jca@
-rw-r--r--sys/kern/vfs_bio.c10
-rw-r--r--sys/kern/vfs_biomem.c5
-rw-r--r--sys/kern/vfs_default.c5
-rw-r--r--sys/kern/vfs_subr.c6
-rw-r--r--sys/kern/vfs_sync.c4
-rw-r--r--sys/kern/vfs_vnops.c4
-rw-r--r--sys/kern/vfs_vops.c4
7 files changed, 19 insertions, 19 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 6b79f1ea564..cfbadd8c96e 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_bio.c,v 1.193 2019/11/29 01:04:08 beck Exp $ */
+/* $OpenBSD: vfs_bio.c,v 1.194 2019/12/08 12:29:42 mpi Exp $ */
/* $NetBSD: vfs_bio.c,v 1.44 1996/06/11 11:15:36 pk Exp $ */
/*
@@ -1101,14 +1101,14 @@ buf_get(struct vnode *vp, daddr_t blkno, size_t size)
curproc != syncerproc && curproc != cleanerproc) {
wakeup(&bd_req);
needbuffer++;
- tsleep(&needbuffer, PRIBIO, "needbuffer", 0);
+ tsleep_nsec(&needbuffer, PRIBIO, "needbuffer", INFSLP);
splx(s);
return (NULL);
}
if (bcstats.dmapages + npages > bufpages) {
/* cleaner or syncer */
nobuffers = 1;
- tsleep(&nobuffers, PRIBIO, "nobuffers", 0);
+ tsleep_nsec(&nobuffers, PRIBIO, "nobuffers", INFSLP);
splx(s);
return (NULL);
}
@@ -1191,7 +1191,7 @@ buf_daemon(void *arg)
needbuffer = 0;
wakeup(&needbuffer);
}
- tsleep(&bd_req, PRIBIO - 7, "cleaner", 0);
+ tsleep_nsec(&bd_req, PRIBIO - 7, "cleaner", INFSLP);
}
while ((bp = bufcache_getdirtybuf())) {
@@ -1247,7 +1247,7 @@ biowait(struct buf *bp)
s = splbio();
while (!ISSET(bp->b_flags, B_DONE))
- tsleep(bp, PRIBIO + 1, "biowait", 0);
+ tsleep_nsec(bp, PRIBIO + 1, "biowait", INFSLP);
splx(s);
/* check for interruption of I/O (e.g. via NFS), then errors. */
diff --git a/sys/kern/vfs_biomem.c b/sys/kern/vfs_biomem.c
index 77d6f882874..40469fea247 100644
--- a/sys/kern/vfs_biomem.c
+++ b/sys/kern/vfs_biomem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_biomem.c,v 1.46 2019/11/29 22:10:04 beck Exp $ */
+/* $OpenBSD: vfs_biomem.c,v 1.47 2019/12/08 12:29:42 mpi Exp $ */
/*
* Copyright (c) 2007 Artur Grabowski <art@openbsd.org>
@@ -110,7 +110,8 @@ buf_map(struct buf *bp)
bcstats.kvaslots_avail <= RESERVE_SLOTS) ||
vbp == NULL) {
buf_needva++;
- tsleep(&buf_needva, PRIBIO, "buf_needva", 0);
+ tsleep_nsec(&buf_needva, PRIBIO, "buf_needva",
+ INFSLP);
vbp = TAILQ_FIRST(&buf_valist);
}
va = buf_unmap(vbp);
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c
index 3fa06f0f1b9..7b6a58f8f1d 100644
--- a/sys/kern/vfs_default.c
+++ b/sys/kern/vfs_default.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_default.c,v 1.43 2017/01/10 19:48:32 bluhm Exp $ */
+/* $OpenBSD: vfs_default.c,v 1.44 2019/12/08 12:29:42 mpi Exp $ */
/*
* Portions of this code are:
@@ -88,8 +88,7 @@ vop_generic_revoke(void *v)
*/
if (vp->v_flag & VXLOCK) {
vp->v_flag |= VXWANT;
- tsleep(vp, PINOD, "vop_generic_revokeall", 0);
-
+ tsleep_nsec(vp, PINOD, "vop_generic_revokeall", INFSLP);
return(0);
}
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 64de71d0680..133f96f440d 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_subr.c,v 1.293 2019/08/26 18:56:29 anton Exp $ */
+/* $OpenBSD: vfs_subr.c,v 1.294 2019/12/08 12:29:42 mpi Exp $ */
/* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */
/*
@@ -652,7 +652,7 @@ vget(struct vnode *vp, int flags)
}
vp->v_flag |= VXWANT;
- tsleep(vp, PINOD, "vget", 0);
+ tsleep_nsec(vp, PINOD, "vget", INFSLP);
return (ENOENT);
}
@@ -1104,7 +1104,7 @@ vgonel(struct vnode *vp, struct proc *p)
*/
if (vp->v_flag & VXLOCK) {
vp->v_flag |= VXWANT;
- tsleep(vp, PINOD, "vgone", 0);
+ tsleep_nsec(vp, PINOD, "vgone", INFSLP);
return;
}
diff --git a/sys/kern/vfs_sync.c b/sys/kern/vfs_sync.c
index ece99ea9a76..14fc49787dc 100644
--- a/sys/kern/vfs_sync.c
+++ b/sys/kern/vfs_sync.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_sync.c,v 1.60 2018/08/13 15:26:17 visa Exp $ */
+/* $OpenBSD: vfs_sync.c,v 1.61 2019/12/08 12:29:42 mpi Exp $ */
/*
* Portions of this code are:
@@ -229,7 +229,7 @@ syncer_thread(void *arg)
* filesystem activity.
*/
if (time_second == starttime)
- tsleep(&lbolt, PPAUSE, "syncer", 0);
+ tsleep_nsec(&lbolt, PPAUSE, "syncer", INFSLP);
}
}
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 3e39dc0e4ee..7cd295b6239 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_vnops.c,v 1.109 2019/11/10 05:00:36 beck Exp $ */
+/* $OpenBSD: vfs_vnops.c,v 1.110 2019/12/08 12:29:42 mpi Exp $ */
/* $NetBSD: vfs_vnops.c,v 1.20 1996/02/04 02:18:41 christos Exp $ */
/*
@@ -564,7 +564,7 @@ vn_lock(struct vnode *vp, int flags)
do {
if (vp->v_flag & VXLOCK) {
vp->v_flag |= VXWANT;
- tsleep(vp, PINOD, "vn_lock", 0);
+ tsleep_nsec(vp, PINOD, "vn_lock", INFSLP);
error = ENOENT;
} else {
vp->v_lockcount++;
diff --git a/sys/kern/vfs_vops.c b/sys/kern/vfs_vops.c
index e606c0b8af7..540bce3e0d9 100644
--- a/sys/kern/vfs_vops.c
+++ b/sys/kern/vfs_vops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_vops.c,v 1.22 2019/08/26 18:56:29 anton Exp $ */
+/* $OpenBSD: vfs_vops.c,v 1.23 2019/12/08 12:29:42 mpi Exp $ */
/*
* Copyright (c) 2010 Thordur I. Bjornsson <thib@openbsd.org>
*
@@ -607,7 +607,7 @@ VOP_LOCK(struct vnode *vp, int flags)
* before continuing.
*/
KASSERT(vp->v_flag & VXLOCK);
- tsleep(&vp->v_lockcount, PINOD, "vop_lock", 0);
+ tsleep_nsec(&vp->v_lockcount, PINOD, "vop_lock", INFSLP);
KASSERT(vp->v_lockcount == 0);
}