summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorKirk McKusick <mckusick@FreeBSD.org>2001-04-17 05:37:51 +0000
committerKirk McKusick <mckusick@FreeBSD.org>2001-04-17 05:37:51 +0000
commit5819ab3f12bbe30611c3138af6a24c47486ea046 (patch)
treecfcb7e31644e82e8bc769e309c72a58834ae0566 /sys/kern
parentf0f3f19f05312accfbc8bf3fb2ca2eff141bacc9 (diff)
Notes
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/vfs_bio.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 8017e19b2722..47059032cb48 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -604,6 +604,10 @@ breadn(struct vnode * vp, daddr_t blkno, int size,
* or in biodone() since the I/O is synchronous. We put it
* here.
*/
+
+int dobkgrdwrite = 1;
+SYSCTL_INT(_debug, OID_AUTO, dobkgrdwrite, CTLFLAG_RW, &dobkgrdwrite, 0, "");
+
int
bwrite(struct buf * bp)
{
@@ -648,7 +652,7 @@ bwrite(struct buf * bp)
* This optimization eats a lot of memory. If we have a page
* or buffer shortfall we can't do it.
*/
- if ((bp->b_xflags & BX_BKGRDWRITE) &&
+ if (dobkgrdwrite && (bp->b_xflags & BX_BKGRDWRITE) &&
(bp->b_flags & B_ASYNC) &&
!vm_page_count_severe() &&
!buf_dirty_count_severe()) {