summaryrefslogtreecommitdiff
path: root/sys/kern/vfs_cluster.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/vfs_cluster.c')
-rw-r--r--sys/kern/vfs_cluster.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c
index d3fc332b376..87b024600bc 100644
--- a/sys/kern/vfs_cluster.c
+++ b/sys/kern/vfs_cluster.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_cluster.c,v 1.8 1997/09/27 06:56:18 niklas Exp $ */
+/* $OpenBSD: vfs_cluster.c,v 1.9 1997/10/06 15:12:36 csapuntz Exp $ */
/* $NetBSD: vfs_cluster.c,v 1.12 1996/04/22 01:39:05 christos Exp $ */
/*-
@@ -48,15 +48,6 @@
#include <vm/vm.h>
-#ifdef DEBUG
-#include <sys/sysctl.h>
-int doreallocblks = 0;
-struct ctldebug debug13 = { "doreallocblks", &doreallocblks };
-#else
-/* XXX for cluster_write */
-#define doreallocblks 0
-#endif
-
/*
* Local declarations
*/
@@ -518,8 +509,7 @@ cluster_write(bp, filesize)
* Otherwise try reallocating to make it sequential.
*/
cursize = vp->v_lastw - vp->v_cstart + 1;
- if (!doreallocblks ||
- (lbn + 1) * bp->b_bcount != filesize ||
+ if ((lbn + 1) * bp->b_bcount != filesize ||
lbn != vp->v_lastw + 1 || vp->v_clen <= cursize) {
cluster_wbuild(vp, NULL, bp->b_bcount,
vp->v_cstart, cursize, lbn);
@@ -708,13 +698,14 @@ redo:
panic("Clustered write to wrong blocks");
}
+ if (LIST_FIRST(&tbp->b_dep) != NULL && bioops.io_start)
+ (*bioops.io_start)(tbp);
+
pagemove(tbp->b_data, cp, size);
bp->b_bcount += size;
bp->b_bufsize += size;
tbp->b_bufsize -= size;
- if (tbp->b_flags & B_DELWRI)
- TAILQ_REMOVE(&bdirties, tbp, b_synclist);
tbp->b_flags &= ~(B_READ | B_DONE | B_ERROR | B_DELWRI);
/*
* We might as well AGE the buffer here; it's either empty, or