From 63a483ed5f4eaadb8979992c7a5de24c7a471c61 Mon Sep 17 00:00:00 2001 From: jeff Date: Mon, 26 Mar 2018 18:36:17 +0000 Subject: [PATCH] Fix a bug introduced in r329612 that slowly invalidates all clean bufs. Reported by: bde Reviewed by: bde Sponsored by: Netflix, Dell/EMC Isilon --- sys/kern/vfs_bio.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index ea0a3f010b14..2022289767b2 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -821,7 +821,8 @@ bufspace_daemon(void *arg) * which will inefficiently trade bufs with bqrelse * until we return to condition 2. */ - do { + while (bd->bd_bufspace > bd->bd_lobufspace || + bd->bd_freebuffers < bd->bd_hifreebuffers) { if (buf_recycle(bd, false) != 0) { if (bd_flushall(bd)) continue; @@ -842,9 +843,7 @@ bufspace_daemon(void *arg) BD_UNLOCK(bd); } maybe_yield(); - } while (bd->bd_bufspace > bd->bd_lobufspace || - bd->bd_freebuffers < bd->bd_hifreebuffers); - + } bufspace_daemon_wait(bd); } }