[3.0] a588d04 Don't start the ban-lurker until -spersistent is done loading.

Tollef Fog Heen tfheen at varnish-cache.org
Mon Apr 16 10:20:36 CEST 2012


commit a588d046f480a56103d915c15b9e6b4b3cba9ab8
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue Nov 8 13:44:29 2011 +0000

    Don't start the ban-lurker until -spersistent is done loading.

diff --git a/bin/varnishd/cache_ban.c b/bin/varnishd/cache_ban.c
index 6b59c5c..bab278d 100644
--- a/bin/varnishd/cache_ban.c
+++ b/bin/varnishd/cache_ban.c
@@ -86,6 +86,7 @@ static struct lock ban_mtx;
 static struct ban *ban_magic;
 static pthread_t ban_thread;
 static struct ban * volatile ban_start;
+static bgthread_t ban_lurker;
 
 /*--------------------------------------------------------------------
  * BAN string magic markers
@@ -567,6 +568,7 @@ BAN_Compile(void)
 
 	SMP_NewBan(ban_magic->spec, ban_len(ban_magic->spec));
 	ban_start = VTAILQ_FIRST(&ban_head);
+	WRK_BgThread(&ban_thread, "ban-lurker", ban_lurker, NULL);
 }
 
 /*--------------------------------------------------------------------
@@ -1074,5 +1076,4 @@ BAN_Init(void)
 	ban_magic->flags |= BAN_F_GONE;
 	VSC_C_main->n_ban_gone++;
 	BAN_Insert(ban_magic);
-	WRK_BgThread(&ban_thread, "ban-lurker", ban_lurker, NULL);
 }



More information about the varnish-commit mailing list