diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2003-01-30 16:38:40 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2003-01-30 16:38:40 +0000 |
commit | 8cd7b8389cd3d6d42d230c30048e1735d86bba53 (patch) | |
tree | 80cf3c41b4a240cf06175b413a9a728cb42f7c9f /sys/kern | |
parent | d21915b2833b1d60110e4cdb81788860c1c0b43e (diff) |
Stop using an LFS type for cluster mallocs, use an own type and
GC the LFS malloc types until LFS is resurrected.
from tedu@stanford.edu
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_cluster.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c index fe397b43ed3..1e2dc10d9a6 100644 --- a/sys/kern/vfs_cluster.c +++ b/sys/kern/vfs_cluster.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_cluster.c,v 1.29 2002/06/14 21:34:59 todd Exp $ */ +/* $OpenBSD: vfs_cluster.c,v 1.30 2003/01/30 16:38:39 art Exp $ */ /* $NetBSD: vfs_cluster.c,v 1.12 1996/04/22 01:39:05 christos Exp $ */ /*- @@ -308,7 +308,7 @@ cluster_rbuild(vp, filesize, bp, lbn, blkno, size, run, flags) return (bp); b_save = malloc(sizeof(struct buf *) * run + - sizeof(struct cluster_save), M_SEGMENT, M_WAITOK); + sizeof(struct cluster_save), M_VCLUSTER, M_WAITOK); b_save->bs_bufsize = b_save->bs_bcount = size; b_save->bs_nchildren = 0; b_save->bs_children = (struct buf **)(b_save + 1); @@ -367,7 +367,7 @@ cluster_rbuild(vp, filesize, bp, lbn, blkno, size, run, flags) bp->b_saveaddr = b_save->bs_saveaddr; bp->b_flags &= ~B_CALL; bp->b_iodone = NULL; - free(b_save, M_SEGMENT); + free(b_save, M_VCLUSTER); } allocbuf(bp, size * i); } @@ -464,7 +464,7 @@ cluster_callback(bp) } bp->b_bcount = bsize; bp->b_iodone = NULL; - free(b_save, M_SEGMENT); + free(b_save, M_VCLUSTER); if (bp->b_flags & B_ASYNC) brelse(bp); else { @@ -532,7 +532,7 @@ cluster_write(bp, ci, filesize) for (bpp = buflist->bs_children; bpp < endbp; bpp++) brelse(*bpp); - free(buflist, M_SEGMENT); + free(buflist, M_VCLUSTER); cluster_wbuild(vp, NULL, bp->b_bcount, ci->ci_cstart, cursize, lbn); } else { @@ -542,7 +542,7 @@ cluster_write(bp, ci, filesize) for (bpp = buflist->bs_children; bpp <= endbp; bpp++) bdwrite(*bpp); - free(buflist, M_SEGMENT); + free(buflist, M_VCLUSTER); ci->ci_lastw = lbn; ci->ci_lasta = bp->b_blkno; return; @@ -665,7 +665,7 @@ redo: --len; b_save = malloc(sizeof(struct buf *) * len + - sizeof(struct cluster_save), M_SEGMENT, M_WAITOK); + sizeof(struct cluster_save), M_VCLUSTER, M_WAITOK); b_save->bs_bcount = bp->b_bcount; b_save->bs_bufsize = bp->b_bufsize; b_save->bs_nchildren = 0; @@ -740,7 +740,7 @@ redo: bp->b_saveaddr = b_save->bs_saveaddr; bp->b_flags &= ~B_CALL; bp->b_iodone = NULL; - free(b_save, M_SEGMENT); + free(b_save, M_VCLUSTER); } bawrite(bp); if (i < len) { @@ -766,7 +766,7 @@ cluster_collectbufs(vp, ci, last_bp) len = ci->ci_lastw - ci->ci_cstart + 1; buflist = malloc(sizeof(struct buf *) * (len + 1) + sizeof(*buflist), - M_SEGMENT, M_WAITOK); + M_VCLUSTER, M_WAITOK); buflist->bs_nchildren = 0; buflist->bs_children = (struct buf **)(buflist + 1); for (lbn = ci->ci_cstart, i = 0; i < len; lbn++, i++) |