summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1995-12-22 16:06:46 +0000
committerbde <bde@FreeBSD.org>1995-12-22 16:06:46 +0000
commitf27e9d3a9dc7c06eccd7c6b2ad6627fe6b1c8964 (patch)
treef10e484eefd450f026c79608ca5ee002b3486a4d /sys
parentda8e7999db42ddba29dd00421332a08ea8a6d8e4 (diff)
downloadFreeBSD-src-f27e9d3a9dc7c06eccd7c6b2ad6627fe6b1c8964.zip
FreeBSD-src-f27e9d3a9dc7c06eccd7c6b2ad6627fe6b1c8964.tar.gz
Fixed bugs and finished staticization for things inside `#ifdef DEBUG'.
Moved most of these things inside `#ifdef notyet_block_reallocation_enabled' where they may never be used again.
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/vfs_cluster.c42
1 files changed, 22 insertions, 20 deletions
diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c
index e031955..2895b09 100644
--- a/sys/kern/vfs_cluster.c
+++ b/sys/kern/vfs_cluster.c
@@ -33,7 +33,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_cluster.c 8.7 (Berkeley) 2/13/94
- * $Id: vfs_cluster.c,v 1.29 1995/12/07 12:47:03 davidg Exp $
+ * $Id: vfs_cluster.c,v 1.30 1995/12/11 04:56:07 dyson Exp $
*/
#include <sys/param.h>
@@ -52,27 +52,29 @@
#include <vm/vm_object.h>
#include <vm/vm_page.h>
+#ifdef notyet_block_reallocation_enabled
#ifdef DEBUG
-#include <vm/vm.h>
#include <sys/sysctl.h>
-int doreallocblks = 0;
-SYSCTL_INT(_debug, 13, doreallocblks, CTLFLAG_RW, &doreallocblks, 0, "");
+#include <sys/kernel.h>
+static int doreallocblks = 0;
+SYSCTL_INT(_debug, 13, doreallocblks, CTLFLAG_RW, &doreallocblks, 0, "");
#else
-/* XXX for cluster_write */
-#define doreallocblks 0
+#define doreallocblks 0
#endif
+#endif /* notyet_block_reallocation_enabled */
-/*
- * Local declarations
- */
-static struct buf *cluster_rbuild __P((struct vnode *, u_quad_t,
- daddr_t, daddr_t, long, int));
-struct cluster_save *cluster_collectbufs __P((struct vnode *, struct buf *));
+#ifdef notyet_block_reallocation_enabled
+static struct cluster_save *
+ cluster_collectbufs __P((struct vnode *vp, struct buf *last_bp));
+#endif
+static struct buf *
+ cluster_rbuild __P((struct vnode *vp, u_quad_t filesize, daddr_t lbn,
+ daddr_t blkno, long size, int run));
-int totreads;
-int totreadblocks;
-extern vm_page_t bogus_page;
+static int totreads;
+static int totreadblocks;
+extern vm_page_t bogus_page;
#ifdef DIAGNOSTIC
/*
@@ -464,7 +466,7 @@ cluster_write(bp, filesize)
* reallocating to make it sequential.
*/
cursize = vp->v_lastw - vp->v_cstart + 1;
-#if 1
+#ifndef notyet_block_reallocation_enabled
if (((u_quad_t)(lbn + 1) * lblocksize) != filesize ||
lbn != vp->v_lastw + 1 ||
vp->v_clen <= cursize) {
@@ -509,7 +511,7 @@ cluster_write(bp, filesize)
return;
}
}
-#endif
+#endif /* notyet_block_reallocation_enabled */
}
/*
* Consider beginning a cluster. If at end of file, make
@@ -684,12 +686,12 @@ cluster_wbuild(vp, size, start_lbn, len)
return totalwritten;
}
-#if 0
+#ifdef notyet_block_reallocation_enabled
/*
* Collect together all the buffers in a cluster.
* Plus add one additional buffer.
*/
-struct cluster_save *
+static struct cluster_save *
cluster_collectbufs(vp, last_bp)
struct vnode *vp;
struct buf *last_bp;
@@ -710,4 +712,4 @@ cluster_collectbufs(vp, last_bp)
buflist->bs_nchildren = i + 1;
return (buflist);
}
-#endif
+#endif /* notyet_block_reallocation_enabled */
OpenPOWER on IntegriCloud