diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-10-06 20:23:17 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-10-06 20:23:17 +0000 |
commit | 85674180ac0b414993bec634994ea51b28390306 (patch) | |
tree | 5ce384dfed739e368b8605fc6db4ed1f26a43609 /sys/nfs/nfs_bio.c | |
parent | 44f83f3e77b70fbce9f014e39cf5c97bae700213 (diff) |
back out vfs lite2 till after 2.2
Diffstat (limited to 'sys/nfs/nfs_bio.c')
-rw-r--r-- | sys/nfs/nfs_bio.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/sys/nfs/nfs_bio.c b/sys/nfs/nfs_bio.c index 3fc3bf9843f..e0a0c292646 100644 --- a/sys/nfs/nfs_bio.c +++ b/sys/nfs/nfs_bio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_bio.c,v 1.11 1997/10/06 15:23:40 csapuntz Exp $ */ +/* $OpenBSD: nfs_bio.c,v 1.12 1997/10/06 20:20:44 deraadt Exp $ */ /* $NetBSD: nfs_bio.c,v 1.25.4.2 1996/07/08 20:47:04 jtc Exp $ */ /* @@ -740,6 +740,16 @@ nfs_asyncio(bp, cred) * is currently doing a write for this file and will pick up the * delayed writes before going back to sleep. */ + if (bp->b_flags & B_DELWRI) + TAILQ_REMOVE(&bdirties, bp, b_synclist); + TAILQ_INSERT_TAIL(&bdirties, bp, b_synclist); + bp->b_synctime = time.tv_sec + 30; + if (bdirties.tqh_first == bp) { + untimeout((void (*)__P((void *)))wakeup, + &bdirties); + timeout((void (*)__P((void *)))wakeup, + &bdirties, 30 * hz); + } bp->b_flags |= B_DELWRI; reassignbuf(bp, bp->b_vp); biodone(bp); @@ -900,6 +910,16 @@ nfs_doio(bp, cr, p) * B_DELWRI and B_NEEDCOMMIT flags. */ if (error == EINTR || (!error && (bp->b_flags & B_NEEDCOMMIT))) { + if (bp->b_flags & B_DELWRI) + TAILQ_REMOVE(&bdirties, bp, b_synclist); + TAILQ_INSERT_TAIL(&bdirties, bp, b_synclist); + bp->b_synctime = time.tv_sec + 30; + if (bdirties.tqh_first == bp) { + untimeout((void (*)__P((void *)))wakeup, + &bdirties); + timeout((void (*)__P((void *)))wakeup, + &bdirties, 30 * hz); + } bp->b_flags |= B_DELWRI; /* |