[PATCH 12/15] Recompile the silo ban lists on exit

Martin Blix Grydeland martin at varnish-software.com
Wed Nov 7 12:32:15 CET 2012


---
 bin/varnishd/storage/storage_persistent.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/bin/varnishd/storage/storage_persistent.c b/bin/varnishd/storage/storage_persistent.c
index ba7996d..bfa5e0c 100644
--- a/bin/varnishd/storage/storage_persistent.c
+++ b/bin/varnishd/storage/storage_persistent.c
@@ -462,6 +462,7 @@ static void
 smp_close(const struct stevedore *st)
 {
 	struct smp_sc	*sc;
+	struct ban *tailb;
 	void *status;
 
 	ASSERT_CLI();
@@ -470,6 +471,11 @@ smp_close(const struct stevedore *st)
 
 	AZ(pthread_join(sc->bgthread, &status));
 	AZ(status);
+
+	/* Recompile the ban lists to get a compacted version */
+	tailb = BAN_TailRef();
+	smp_recompile_bans(sc, tailb);
+	BAN_TailDeref(&tailb);
 }
 
 /*--------------------------------------------------------------------
-- 
1.7.9.5




More information about the varnish-dev mailing list