summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1996-11-11 08:36:35 +0000
committerJason Downs <downsj@cvs.openbsd.org>1996-11-11 08:36:35 +0000
commit22d20d1a7f65aeaa53ff352f4a517b6b4fcfc8ba (patch)
tree4081981bddfcbfb24e3d85193531ffaa7f906ef6 /sys
parenta8efea36850e956a7551ee3f0ad565547d4fe72b (diff)
Update support, from Thorsten.
Diffstat (limited to 'sys')
-rw-r--r--sys/gnu/ext2fs/ext2_linux_ialloc.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/sys/gnu/ext2fs/ext2_linux_ialloc.c b/sys/gnu/ext2fs/ext2_linux_ialloc.c
index dee34c94b2a..3c2013a6790 100644
--- a/sys/gnu/ext2fs/ext2_linux_ialloc.c
+++ b/sys/gnu/ext2fs/ext2_linux_ialloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext2_linux_ialloc.c,v 1.3 1996/10/18 15:23:37 mickey Exp $ */
+/* $OpenBSD: ext2_linux_ialloc.c,v 1.4 1996/11/11 08:36:34 downsj Exp $ */
/*
* modified for Lites 1.1
@@ -32,6 +32,7 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/buf.h>
+#include <sys/kernel.h>
#include <sys/proc.h>
#include <sys/mount.h>
#include <sys/vnode.h>
@@ -57,6 +58,16 @@ void mark_buffer_dirty(struct buf *bh)
{
bh->b_flags |= B_DELWRI;
bh->b_flags &= ~(B_READ | B_ERROR);
+
+ /*
+ * Add the block the dirty list.
+ */
+ TAILQ_INSERT_TAIL(&bdirties, bh, b_synclist);
+ bh->b_synctime = time.tv_sec + 30;
+ if (bdirties.tqh_first == bh) {
+ untimeout((void (*)__P((void *)))wakeup, &bdirties);
+ timeout((void (*)__P((void *)))wakeup, &bdirties, 30 * hz);
+ }
}
/*
@@ -64,6 +75,12 @@ void mark_buffer_dirty(struct buf *bh)
*/
int ll_w_block(struct buf * bp, int waitfor)
{
+ /*
+ * Remove the block from the dirty list.
+ */
+ if (bp->b_flags & B_DELWRI)
+ TAILQ_REMOVE(&bdirties, bp, b_synclist);
+
bp->b_flags &= ~(B_READ|B_DONE|B_ERROR|B_DELWRI);
bp->b_flags |= B_WRITEINPROG;
bp->b_vp->v_numoutput++;