UFS+softupdates can build up thousands of dirty 1K buffers and run out
authorMatthew Dillon <dillon@dragonflybsd.org>
Mon, 7 Jul 2008 17:31:07 +0000 (17:31 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Mon, 7 Jul 2008 17:31:07 +0000 (17:31 +0000)
commit70ac7d6c7574e62feab99ee6e1cfde36ae4eca18
tree4951867dd36d3ce13941bed410335878fb93c5c7
parent3e3a527ffd115d09712cb4bba9af3473af1af81c
UFS+softupdates can build up thousands of dirty 1K buffers and run out
of buffers before it even hits the lodirtybufspace point.  The buf_daemon
is never triggered.  This case occurs rarely but can be triggered e.g.
by a cvs update.

Add dirtybufcount back in and flush if it exceeds (nbuf / 2) to handle
this degenerate case.

Reported-by: "Sepherosa Ziehau" <sepherosa@gmail.com>
sys/kern/vfs_bio.c