From 922ef7a58ff5341d1559211bed8b226397debea9 Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 23 Feb 2009 11:31:08 +0000 Subject: [PATCH] Move on to the worker process side of persistent storage git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3811 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/stevedore.c | 1 + varnish-cache/bin/varnishd/storage_persistent.c | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/varnish-cache/bin/varnishd/stevedore.c b/varnish-cache/bin/varnishd/stevedore.c index 6e19b5df..f1432ddc 100644 --- a/varnish-cache/bin/varnishd/stevedore.c +++ b/varnish-cache/bin/varnishd/stevedore.c @@ -60,6 +60,7 @@ STV_alloc(struct sess *sp, size_t size) stv_next = stv; /* try to allocate from it */ + AN(stv->alloc); st = stv->alloc(stv, size); if (st != NULL) break; diff --git a/varnish-cache/bin/varnishd/storage_persistent.c b/varnish-cache/bin/varnishd/storage_persistent.c index 59765819..d8347008 100644 --- a/varnish-cache/bin/varnishd/storage_persistent.c +++ b/varnish-cache/bin/varnishd/storage_persistent.c @@ -28,6 +28,9 @@ * $Id$ * * Persistent storage method + * + * XXX: Before we start the client or maybe after it stops, we should give the + * XXX: stevedores a chance to examine their storage for consistency. */ #include "config.h" @@ -266,7 +269,11 @@ smp_init(struct stevedore *parent, int ac, char * const *av) smp_newsilo(sc); fprintf(stderr, "Silo: %d\n", smp_valid_silo(sc)); AZ(smp_valid_silo(sc)); - exit (2); + + parent->priv = sc; + + /* XXX: only for sendfile I guess... */ + mgt_child_inherit(sc->fd, "storage_persistent"); } /*--------------------------------------------------------------------*/ -- 2.39.5