]> err.no Git - varnish/commitdiff
Move on to the worker process side of persistent storage
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 23 Feb 2009 11:31:08 +0000 (11:31 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 23 Feb 2009 11:31:08 +0000 (11:31 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3811 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/stevedore.c
varnish-cache/bin/varnishd/storage_persistent.c

index 6e19b5df44c838eb9d18c4927458e61ab345e6ea..f1432ddc70a0ed3c8aac808ca561a5362add7ec5 100644 (file)
@@ -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;
index 5976581945eac6203912523989798ffed020c6ce..d8347008b4fea143cf6a40b28f1fd368de13e95a 100644 (file)
@@ -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");
 }
 
 /*--------------------------------------------------------------------*/