diff options
author | dg <dg@FreeBSD.org> | 1999-06-16 15:54:30 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1999-06-16 15:54:30 +0000 |
commit | e44ff62d384f14b4e19ee57b580fe95798be7e69 (patch) | |
tree | d52f0ce6bc71db0fe41f3881a9c30874849ad525 | |
parent | 3b7c3aa4be419cf5415989e5ad1552b65226d743 (diff) | |
download | FreeBSD-src-e44ff62d384f14b4e19ee57b580fe95798be7e69.zip FreeBSD-src-e44ff62d384f14b4e19ee57b580fe95798be7e69.tar.gz |
Changed trypbuf to a getpbuf to work around a problem where redundant writes
would occur when clustering them - caused by running out of buffers
and taking a degenerate code path as a result. It appears that waiting
instead for buffers to become available is okay.
Submitted by: Matthew Dillon <dillon@apollo.backplane.com>
Discovered by: Craig A Soules <soules+@andrew.cmu.edu>
-rw-r--r-- | sys/kern/vfs_cluster.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c index 5f7f870..47e4322 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.80 1999/03/12 02:24:56 julian Exp $ + * $Id: vfs_cluster.c,v 1.81 1999/05/02 23:56:11 alc Exp $ */ #include "opt_debug_cluster.h" @@ -660,7 +660,7 @@ cluster_wbuild(vp, size, start_lbn, len) (tbp->b_bcount != tbp->b_bufsize) || (tbp->b_bcount != size) || (len == 1) || - ((bp = trypbuf(&cluster_pbuf_freecnt)) == NULL)) { + ((bp = getpbuf(&cluster_pbuf_freecnt)) == NULL)) { totalwritten += tbp->b_bufsize; bawrite(tbp); ++start_lbn; |