mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-29 21:26:51 +00:00
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>
This commit is contained in:
parent
ec5035fa0b
commit
cd3fe8d008
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=47948
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue