r5088 - in trunk/varnish-cache: bin/varnishd include

phk at varnish-cache.org phk at varnish-cache.org
Wed Aug 11 13:37:01 CEST 2010


Author: phk
Date: 2010-08-11 13:37:01 +0200 (Wed, 11 Aug 2010)
New Revision: 5088

Modified:
   trunk/varnish-cache/bin/varnishd/cache.h
   trunk/varnish-cache/bin/varnishd/cache_backend.c
   trunk/varnish-cache/bin/varnishd/cache_backend.h
   trunk/varnish-cache/bin/varnishd/cache_backend_cfg.c
   trunk/varnish-cache/bin/varnishd/cache_center.c
   trunk/varnish-cache/bin/varnishd/cache_cli.c
   trunk/varnish-cache/bin/varnishd/cache_dir_dns.c
   trunk/varnish-cache/bin/varnishd/cache_dir_random.c
   trunk/varnish-cache/bin/varnishd/cache_dir_round_robin.c
   trunk/varnish-cache/bin/varnishd/cache_fetch.c
   trunk/varnish-cache/bin/varnishd/cache_panic.c
   trunk/varnish-cache/bin/varnishd/cache_pipe.c
   trunk/varnish-cache/bin/varnishd/cache_vrt.c
   trunk/varnish-cache/bin/varnishd/heritage.h
   trunk/varnish-cache/bin/varnishd/mgt_param.c
   trunk/varnish-cache/include/stat_field.h
   trunk/varnish-cache/include/vsc_fields.h
Log:
Rename backend connections to the VTLA "VBC"



Modified: trunk/varnish-cache/bin/varnishd/cache.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache.h	2010-08-11 09:40:20 UTC (rev 5087)
+++ trunk/varnish-cache/bin/varnishd/cache.h	2010-08-11 11:37:01 UTC (rev 5088)
@@ -426,7 +426,7 @@
 	VTAILQ_ENTRY(sess)	list;
 
 	struct director		*director;
-	struct vbe_conn		*vbe;
+	struct vbc		*vbc;
 	struct object		*obj;
 	struct objcore		*objcore;
 	struct objhead		*objhead;
@@ -448,10 +448,10 @@
 /* -------------------------------------------------------------------*/
 
 /* Backend connection */
-struct vbe_conn {
+struct vbc {
 	unsigned		magic;
-#define VBE_CONN_MAGIC		0x0c5e6592
-	VTAILQ_ENTRY(vbe_conn)	list;
+#define VBC_MAGIC		0x0c5e6592
+	VTAILQ_ENTRY(vbc)	list;
 	struct backend		*backend;
 	int			fd;
 
@@ -473,7 +473,7 @@
 
 /* cache_backend.c */
 
-struct vbe_conn *VBE_GetFd(const struct director *, struct sess *sp);
+struct vbc *VBE_GetFd(const struct director *, struct sess *sp);
 int VBE_Healthy(double now, const struct director *, uintptr_t target);
 int VBE_Healthy_sp(const struct sess *sp, const struct director *);
 void VBE_CloseFd(struct sess *sp);

Modified: trunk/varnish-cache/bin/varnishd/cache_backend.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_backend.c	2010-08-11 09:40:20 UTC (rev 5087)
+++ trunk/varnish-cache/bin/varnishd/cache_backend.c	2010-08-11 11:37:01 UTC (rev 5088)
@@ -49,9 +49,9 @@
 #include "vrt.h"
 
 /*
- * List of cached vbe_conns, used if enabled in params/heritage
+ * List of cached vbcs, used if enabled in params/heritage
  */
-static VTAILQ_HEAD(,vbe_conn) vbe_conns = VTAILQ_HEAD_INITIALIZER(vbe_conns);
+static VTAILQ_HEAD(,vbc) vbcs = VTAILQ_HEAD_INITIALIZER(vbcs);
 
 /*--------------------------------------------------------------------
  * Create default Host: header for backend request
@@ -62,29 +62,29 @@
 
 	CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
 	CHECK_OBJ_NOTNULL(sp->wrk->bereq, HTTP_MAGIC);
-	CHECK_OBJ_NOTNULL(sp->vbe, VBE_CONN_MAGIC);
-	CHECK_OBJ_NOTNULL(sp->vbe->backend, BACKEND_MAGIC);
+	CHECK_OBJ_NOTNULL(sp->vbc, VBC_MAGIC);
+	CHECK_OBJ_NOTNULL(sp->vbc->backend, BACKEND_MAGIC);
 	http_PrintfHeader(sp->wrk, sp->fd, sp->wrk->bereq,
-	    "Host: %s", sp->vbe->backend->hosthdr);
+	    "Host: %s", sp->vbc->backend->hosthdr);
 }
 
 /* Private interface from backend_cfg.c */
 void
-VBE_ReleaseConn(struct vbe_conn *vc)
+VBE_ReleaseConn(struct vbc *vc)
 {
 
-	CHECK_OBJ_NOTNULL(vc, VBE_CONN_MAGIC);
+	CHECK_OBJ_NOTNULL(vc, VBC_MAGIC);
 	assert(vc->backend == NULL);
 	assert(vc->fd < 0);
 
-	if (params->cache_vbe_conns) {
+	if (params->cache_vbcs) {
 		Lck_Lock(&VBE_mtx);
-		VTAILQ_INSERT_HEAD(&vbe_conns, vc, list);
+		VTAILQ_INSERT_HEAD(&vbcs, vc, list);
 		VSC_main->backend_unused++;
 		Lck_Unlock(&VBE_mtx);
 	} else {
 		Lck_Lock(&VBE_mtx);
-		VSC_main->n_vbe_conn--;
+		VSC_main->n_vbc--;
 		Lck_Unlock(&VBE_mtx);
 		free(vc);
 	}
@@ -197,23 +197,23 @@
 }
 
 /*--------------------------------------------------------------------
- * Manage a pool of vbe_conn structures.
+ * Manage a pool of vbc structures.
  * XXX: as an experiment, make this caching controled by a parameter
  * XXX: so we can see if it has any effect.
  */
 
-static struct vbe_conn *
+static struct vbc *
 vbe_NewConn(void)
 {
-	struct vbe_conn *vc;
+	struct vbc *vc;
 
-	vc = VTAILQ_FIRST(&vbe_conns);
+	vc = VTAILQ_FIRST(&vbcs);
 	if (vc != NULL) {
 		Lck_Lock(&VBE_mtx);
-		vc = VTAILQ_FIRST(&vbe_conns);
+		vc = VTAILQ_FIRST(&vbcs);
 		if (vc != NULL) {
 			VSC_main->backend_unused--;
-			VTAILQ_REMOVE(&vbe_conns, vc, list);
+			VTAILQ_REMOVE(&vbcs, vc, list);
 		}
 		Lck_Unlock(&VBE_mtx);
 	}
@@ -221,10 +221,10 @@
 		return (vc);
 	vc = calloc(sizeof *vc, 1);
 	XXXAN(vc);
-	vc->magic = VBE_CONN_MAGIC;
+	vc->magic = VBC_MAGIC;
 	vc->fd = -1;
 	Lck_Lock(&VBE_mtx);
-	VSC_main->n_vbe_conn++;
+	VSC_main->n_vbc++;
 	Lck_Unlock(&VBE_mtx);
 	return (vc);
 }
@@ -312,15 +312,15 @@
  * Get a connection to a particular backend.
  */
 
-static struct vbe_conn *
+static struct vbc *
 vbe_GetVbe(struct sess *sp, struct backend *bp)
 {
-	struct vbe_conn *vc;
+	struct vbc *vc;
 
 	CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
 	CHECK_OBJ_NOTNULL(bp, BACKEND_MAGIC);
 
-	/* first look for vbe_conn's we can recycle */
+	/* first look for vbc's we can recycle */
 	while (1) {
 		Lck_Lock(&bp->mtx);
 		vc = VTAILQ_FIRST(&bp->connlist);
@@ -341,7 +341,7 @@
 			return (vc);
 		}
 		VSC_main->backend_toolate++;
-		sp->vbe = vc;
+		sp->vbc = vc;
 		VBE_CloseFd(sp);
 	}
 
@@ -378,18 +378,18 @@
 {
 	struct backend *bp;
 
-	CHECK_OBJ_NOTNULL(sp->vbe, VBE_CONN_MAGIC);
-	CHECK_OBJ_NOTNULL(sp->vbe->backend, BACKEND_MAGIC);
-	assert(sp->vbe->fd >= 0);
+	CHECK_OBJ_NOTNULL(sp->vbc, VBC_MAGIC);
+	CHECK_OBJ_NOTNULL(sp->vbc->backend, BACKEND_MAGIC);
+	assert(sp->vbc->fd >= 0);
 
-	bp = sp->vbe->backend;
+	bp = sp->vbc->backend;
 
-	WSL(sp->wrk, SLT_BackendClose, sp->vbe->fd, "%s", bp->vcl_name);
-	TCP_close(&sp->vbe->fd);
+	WSL(sp->wrk, SLT_BackendClose, sp->vbc->fd, "%s", bp->vcl_name);
+	TCP_close(&sp->vbc->fd);
 	VBE_DropRefConn(bp);
-	sp->vbe->backend = NULL;
-	VBE_ReleaseConn(sp->vbe);
-	sp->vbe = NULL;
+	sp->vbc->backend = NULL;
+	VBE_ReleaseConn(sp->vbc);
+	sp->vbc = NULL;
 }
 
 /* Recycle a connection ----------------------------------------------*/
@@ -399,13 +399,13 @@
 {
 	struct backend *bp;
 
-	CHECK_OBJ_NOTNULL(sp->vbe, VBE_CONN_MAGIC);
-	CHECK_OBJ_NOTNULL(sp->vbe->backend, BACKEND_MAGIC);
-	assert(sp->vbe->fd >= 0);
+	CHECK_OBJ_NOTNULL(sp->vbc, VBC_MAGIC);
+	CHECK_OBJ_NOTNULL(sp->vbc->backend, BACKEND_MAGIC);
+	assert(sp->vbc->fd >= 0);
 
-	bp = sp->vbe->backend;
+	bp = sp->vbc->backend;
 
-	WSL(sp->wrk, SLT_BackendReuse, sp->vbe->fd, "%s", bp->vcl_name);
+	WSL(sp->wrk, SLT_BackendReuse, sp->vbc->fd, "%s", bp->vcl_name);
 	/*
 	 * Flush the shmlog, so that another session reusing this backend
 	 * will log chronologically later than our use of it.
@@ -413,14 +413,14 @@
 	WSL_Flush(sp->wrk, 0);
 	Lck_Lock(&bp->mtx);
 	VSC_main->backend_recycle++;
-	VTAILQ_INSERT_HEAD(&bp->connlist, sp->vbe, list);
-	sp->vbe = NULL;
+	VTAILQ_INSERT_HEAD(&bp->connlist, sp->vbc, list);
+	sp->vbc = NULL;
 	VBE_DropRefLocked(bp);
 }
 
 /* Get a connection --------------------------------------------------*/
 
-struct vbe_conn *
+struct vbc *
 VBE_GetFd(const struct director *d, struct sess *sp)
 {
 
@@ -554,11 +554,11 @@
 	return vs->backend;
 }
 
-static struct vbe_conn *
+static struct vbc *
 vdi_simple_getfd(const struct director *d, struct sess *sp)
 {
 	struct vdi_simple *vs;
-	struct vbe_conn *vc;
+	struct vbc *vc;
 
 	CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
 	CHECK_OBJ_NOTNULL(d, DIRECTOR_MAGIC);

Modified: trunk/varnish-cache/bin/varnishd/cache_backend.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_backend.h	2010-08-11 09:40:20 UTC (rev 5087)
+++ trunk/varnish-cache/bin/varnishd/cache_backend.h	2010-08-11 11:37:01 UTC (rev 5088)
@@ -38,10 +38,10 @@
  *    A backend is a TCP destination, possibly multi-homed and it has a
  *    number of associated properties and statistics.
  *
- *    A vbe_conn is an open TCP connection to a backend.
+ *    A vbc is an open TCP connection to a backend.
  *
  *    A bereq is a memory carrier for handling a HTTP transaction with
- *    a backend over a vbe_conn.
+ *    a backend over a vbc.
  *
  *    A director is a piece of code that selects which backend to use,
  *    by whatever method or metric it chooses.
@@ -53,7 +53,7 @@
  *
  *    When a VCL tries to instantiate a backend, any existing backend
  *    with the same identity (== definition in VCL) will be used instead
- *    so that vbe_conn's can be reused across VCL changes.
+ *    so that vbc's can be reused across VCL changes.
  *
  *    Directors disapper with the VCL that created them.
  *
@@ -69,7 +69,7 @@
  */
 
 struct vbp_target;
-struct vbe_conn;
+struct vbc;
 struct vrt_backend_probe;
 
 /*--------------------------------------------------------------------
@@ -77,7 +77,7 @@
  * backends to use.
  */
 
-typedef struct vbe_conn *vdi_getfd_f(const struct director *, struct sess *sp);
+typedef struct vbc *vdi_getfd_f(const struct director *, struct sess *sp);
 typedef void vdi_fini_f(struct director *);
 typedef unsigned vdi_healthy(double now, const struct director *,
     uintptr_t target);
@@ -133,7 +133,7 @@
 
 	unsigned		max_conn;
 	unsigned		n_conn;
-	VTAILQ_HEAD(, vbe_conn)	connlist;
+	VTAILQ_HEAD(, vbc)	connlist;
 
 	struct vbp_target	*probe;
 	unsigned		healthy;
@@ -142,7 +142,7 @@
 };
 
 /* cache_backend.c */
-void VBE_ReleaseConn(struct vbe_conn *vc);
+void VBE_ReleaseConn(struct vbc *vc);
 struct backend *vdi_get_backend_if_simple(const struct director *d);
 
 /* cache_backend_cfg.c */

Modified: trunk/varnish-cache/bin/varnishd/cache_backend_cfg.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_backend_cfg.c	2010-08-11 09:40:20 UTC (rev 5087)
+++ trunk/varnish-cache/bin/varnishd/cache_backend_cfg.c	2010-08-11 11:37:01 UTC (rev 5088)
@@ -101,7 +101,7 @@
 VBE_DropRefLocked(struct backend *b)
 {
 	int i;
-	struct vbe_conn *vbe, *vbe2;
+	struct vbc *vbe, *vbe2;
 
 	CHECK_OBJ_NOTNULL(b, BACKEND_MAGIC);
 	assert(b->refcount > 0);

Modified: trunk/varnish-cache/bin/varnishd/cache_center.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_center.c	2010-08-11 09:40:20 UTC (rev 5087)
+++ trunk/varnish-cache/bin/varnishd/cache_center.c	2010-08-11 11:37:01 UTC (rev 5088)
@@ -229,7 +229,7 @@
 	CHECK_OBJ_ORNULL(sp->vcl, VCL_CONF_MAGIC);
 
 	AZ(sp->obj);
-	AZ(sp->vbe);
+	AZ(sp->vbc);
 	sp->director = NULL;
 	sp->restarts = 0;
 
@@ -432,7 +432,7 @@
 	CHECK_OBJ_NOTNULL(sp->vcl, VCL_CONF_MAGIC);
 
 	AN(sp->director);
-	AZ(sp->vbe);
+	AZ(sp->vbc);
 
 	/* sp->wrk->http[0] is (still) bereq */
 	sp->wrk->beresp = sp->wrk->http[1];
@@ -592,7 +592,7 @@
 
 	i = FetchBody(sp);
 	AZ(sp->wrk->wfd);
-	AZ(sp->vbe);
+	AZ(sp->vbc);
 	AN(sp->director);
 
 	if (i) {

Modified: trunk/varnish-cache/bin/varnishd/cache_cli.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_cli.c	2010-08-11 09:40:20 UTC (rev 5087)
+++ trunk/varnish-cache/bin/varnishd/cache_cli.c	2010-08-11 11:37:01 UTC (rev 5088)
@@ -135,7 +135,7 @@
 	SZOF(struct objcore);
 	SZOF(struct objhead);
 	SZOF(struct sess);
-	SZOF(struct vbe_conn);
+	SZOF(struct vbc);
 	SZOF(struct vsc_main);
 	SZOF(struct lock);
 }

Modified: trunk/varnish-cache/bin/varnishd/cache_dir_dns.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_dir_dns.c	2010-08-11 09:40:20 UTC (rev 5087)
+++ trunk/varnish-cache/bin/varnishd/cache_dir_dns.c	2010-08-11 11:37:01 UTC (rev 5088)
@@ -383,12 +383,12 @@
 	return ret;
 }
 
-static struct vbe_conn *
+static struct vbc *
 vdi_dns_getfd(const struct director *director, struct sess *sp)
 {
 	struct vdi_dns *vs;
 	struct director *dir;
-	struct vbe_conn *vbe;
+	struct vbc *vbe;
 
 	CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
 	CHECK_OBJ_NOTNULL(director, DIRECTOR_MAGIC);

Modified: trunk/varnish-cache/bin/varnishd/cache_dir_random.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_dir_random.c	2010-08-11 09:40:20 UTC (rev 5087)
+++ trunk/varnish-cache/bin/varnishd/cache_dir_random.c	2010-08-11 11:37:01 UTC (rev 5088)
@@ -80,14 +80,14 @@
 	unsigned		nhosts;
 };
 
-static struct vbe_conn *
+static struct vbc *
 vdi_random_getfd(const struct director *d, struct sess *sp)
 {
 	int i, k;
 	struct vdi_random *vs;
 	double r, s1;
 	unsigned u = 0;
-	struct vbe_conn *vbe;
+	struct vbc *vbe;
 	struct director *d2;
 	struct SHA256Context ctx;
 	uint8_t sign[SHA256_LEN], *hp;

Modified: trunk/varnish-cache/bin/varnishd/cache_dir_round_robin.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_dir_round_robin.c	2010-08-11 09:40:20 UTC (rev 5087)
+++ trunk/varnish-cache/bin/varnishd/cache_dir_round_robin.c	2010-08-11 11:37:01 UTC (rev 5088)
@@ -59,13 +59,13 @@
 	unsigned			next_host;
 };
 
-static struct vbe_conn *
+static struct vbc *
 vdi_round_robin_getfd(const struct director *d, struct sess *sp)
 {
 	int i;
 	struct vdi_round_robin *vs;
 	struct director *backend;
-	struct vbe_conn *vbe;
+	struct vbc *vbe;
 
 	CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
 	CHECK_OBJ_NOTNULL(d, DIRECTOR_MAGIC);

Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_fetch.c	2010-08-11 09:40:20 UTC (rev 5087)
+++ trunk/varnish-cache/bin/varnishd/cache_fetch.c	2010-08-11 11:37:01 UTC (rev 5088)
@@ -329,7 +329,7 @@
 int
 FetchHdr(struct sess *sp)
 {
-	struct vbe_conn *vc;
+	struct vbc *vc;
 	struct worker *w;
 	char *b;
 	struct http *hp;
@@ -351,12 +351,12 @@
 	w = sp->wrk;
 	hp = sp->wrk->bereq;
 
-	sp->vbe = VBE_GetFd(NULL, sp);
-	if (sp->vbe == NULL) {
+	sp->vbc = VBE_GetFd(NULL, sp);
+	if (sp->vbc == NULL) {
 		WSP(sp, SLT_FetchError, "no backend connection");
 		return (__LINE__);
 	}
-	vc = sp->vbe;
+	vc = sp->vbc;
 
 	/*
 	 * Now that we know our backend, we can set a default Host:
@@ -424,7 +424,7 @@
 int
 FetchBody(struct sess *sp)
 {
-	struct vbe_conn *vc;
+	struct vbc *vc;
 	char *b;
 	int cls;
 	struct http *hp;
@@ -442,7 +442,7 @@
 	if (sp->obj->objcore != NULL)		/* pass has no objcore */
 		AN(ObjIsBusy(sp->obj));
 
-	vc = sp->vbe;
+	vc = sp->vbc;
 
 	is_head = (strcasecmp(http_GetReq(sp->wrk->bereq), "head") == 0);
 
@@ -520,7 +520,7 @@
 		return (__LINE__);
 	}
 
-	WSL(sp->wrk, SLT_Length, sp->vbe->fd, "%u", sp->obj->len);
+	WSL(sp->wrk, SLT_Length, sp->vbc->fd, "%u", sp->obj->len);
 
 	{
 	/* Sanity check fetch methods accounting */

Modified: trunk/varnish-cache/bin/varnishd/cache_panic.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_panic.c	2010-08-11 09:40:20 UTC (rev 5087)
+++ trunk/varnish-cache/bin/varnishd/cache_panic.c	2010-08-11 11:37:01 UTC (rev 5088)
@@ -89,14 +89,14 @@
 /*--------------------------------------------------------------------*/
 
 static void
-pan_vbe(const struct vbe_conn *vbe)
+pan_vbc(const struct vbc *vbc)
 {
 
 	struct backend *be;
 
-	be = vbe->backend;
+	be = vbc->backend;
 
-	vsb_printf(vsp, "  backend = %p fd = %d {\n", be, vbe->fd);
+	vsb_printf(vsp, "  backend = %p fd = %d {\n", be, vbc->fd);
 	vsb_printf(vsp, "    vcl_name = \"%s\",\n", be->vcl_name);
 	vsb_printf(vsp, "  },\n");
 }
@@ -252,8 +252,8 @@
 	if (VALID_OBJ(sp->vcl, VCL_CONF_MAGIC))
 		pan_vcl(sp->vcl);
 
-	if (VALID_OBJ(sp->vbe, BACKEND_MAGIC))
-		pan_vbe(sp->vbe);
+	if (VALID_OBJ(sp->vbc, BACKEND_MAGIC))
+		pan_vbc(sp->vbc);
 
 	if (VALID_OBJ(sp->obj, OBJECT_MAGIC))
 		pan_object(sp->obj);

Modified: trunk/varnish-cache/bin/varnishd/cache_pipe.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_pipe.c	2010-08-11 09:40:20 UTC (rev 5087)
+++ trunk/varnish-cache/bin/varnishd/cache_pipe.c	2010-08-11 11:37:01 UTC (rev 5088)
@@ -65,7 +65,7 @@
 void
 PipeSession(struct sess *sp)
 {
-	struct vbe_conn *vc;
+	struct vbc *vc;
 	struct worker *w;
 	struct pollfd fds[2];
 	int i;
@@ -74,10 +74,10 @@
 	CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC);
 	w = sp->wrk;
 
-	sp->vbe = VBE_GetFd(NULL, sp);
-	if (sp->vbe == NULL)
+	sp->vbc = VBE_GetFd(NULL, sp);
+	if (sp->vbc == NULL)
 		return;
-	vc = sp->vbe;
+	vc = sp->vbc;
 	(void)TCP_blocking(vc->fd);
 
 	WRW_Reserve(w, &vc->fd);

Modified: trunk/varnish-cache/bin/varnishd/cache_vrt.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_vrt.c	2010-08-11 09:40:20 UTC (rev 5087)
+++ trunk/varnish-cache/bin/varnishd/cache_vrt.c	2010-08-11 11:37:01 UTC (rev 5088)
@@ -293,12 +293,12 @@
 	struct trouble *tr2;
 
 	CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
-	if (!sp->vbe)
+	if (!sp->vbc)
 		return;
-	CHECK_OBJ_NOTNULL(sp->vbe, VBE_CONN_MAGIC);
-	if (!sp->vbe->backend)
+	CHECK_OBJ_NOTNULL(sp->vbc, VBC_MAGIC);
+	if (!sp->vbc->backend)
 		return;
-	CHECK_OBJ_NOTNULL(sp->vbe->backend, BACKEND_MAGIC);
+	CHECK_OBJ_NOTNULL(sp->vbc->backend, BACKEND_MAGIC);
 	if (!sp->objhead)
 		return;
 	CHECK_OBJ_NOTNULL(sp->objhead, OBJHEAD_MAGIC);
@@ -317,8 +317,8 @@
 	 * timeout at a later date (ie: sort by which entry will time out
 	 * from the list
 	 */
-	Lck_Lock(&sp->vbe->backend->mtx);
-	VTAILQ_FOREACH_SAFE(tr, &sp->vbe->backend->troublelist, list, tr2) {
+	Lck_Lock(&sp->vbc->backend->mtx);
+	VTAILQ_FOREACH_SAFE(tr, &sp->vbc->backend->troublelist, list, tr2) {
 		if (tr->timeout < new->timeout) {
 			VTAILQ_INSERT_BEFORE(tr, new, list);
 			new = NULL;
@@ -330,9 +330,9 @@
 	 * items have a longer timeout.
 	 */
 	if (new)
-		VTAILQ_INSERT_TAIL(&sp->vbe->backend->troublelist, new, list);
+		VTAILQ_INSERT_TAIL(&sp->vbc->backend->troublelist, new, list);
 
-	Lck_Unlock(&sp->vbe->backend->mtx);
+	Lck_Unlock(&sp->vbc->backend->mtx);
 }
 
 int

Modified: trunk/varnish-cache/bin/varnishd/heritage.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/heritage.h	2010-08-11 09:40:20 UTC (rev 5087)
+++ trunk/varnish-cache/bin/varnishd/heritage.h	2010-08-11 11:37:01 UTC (rev 5088)
@@ -144,8 +144,8 @@
 	/* Rush exponent */
 	unsigned		rush_exponent;
 
-	/* Cache vbe_conns */
-	unsigned		cache_vbe_conns;
+	/* Cache vbcs */
+	unsigned		cache_vbcs;
 
 	/* Default connection_timeout */
 	double			connect_timeout;

Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/mgt_param.c	2010-08-11 09:40:20 UTC (rev 5087)
+++ trunk/varnish-cache/bin/varnishd/mgt_param.c	2010-08-11 11:37:01 UTC (rev 5088)
@@ -655,8 +655,8 @@
 		"Maximum depth of esi:include processing.\n",
 		0,
 		"5", "includes" },
-	{ "cache_vbe_conns", tweak_bool,  &master.cache_vbe_conns, 0, 0,
-		"Cache vbe_conn's or rely on malloc, that's the question.",
+	{ "cache_vbcs", tweak_bool,  &master.cache_vbcs, 0, 0,
+		"Cache vbc's or rely on malloc, that's the question.",
 		EXPERIMENTAL,
 		"off", "bool" },
 	{ "connect_timeout", tweak_timeout_double,

Modified: trunk/varnish-cache/include/stat_field.h
===================================================================
--- trunk/varnish-cache/include/stat_field.h	2010-08-11 09:40:20 UTC (rev 5087)
+++ trunk/varnish-cache/include/stat_field.h	2010-08-11 11:37:01 UTC (rev 5088)
@@ -75,7 +75,7 @@
 MAC_STAT(n_smf,			uint64_t, 0, 'i', "N struct smf")
 MAC_STAT(n_smf_frag,		uint64_t, 0, 'i', "N small free smf")
 MAC_STAT(n_smf_large,		uint64_t, 0, 'i', "N large free smf")
-MAC_STAT(n_vbe_conn,		uint64_t, 0, 'i', "N struct vbe_conn")
+MAC_STAT(n_vbc,		uint64_t, 0, 'i', "N struct vbc")
 MAC_STAT(n_wrk,			uint64_t, 0, 'i', "N worker threads")
 MAC_STAT(n_wrk_create,		uint64_t, 0, 'a', "N worker threads created")
 MAC_STAT(n_wrk_failed,		uint64_t, 0, 'a',

Modified: trunk/varnish-cache/include/vsc_fields.h
===================================================================
--- trunk/varnish-cache/include/vsc_fields.h	2010-08-11 09:40:20 UTC (rev 5087)
+++ trunk/varnish-cache/include/vsc_fields.h	2010-08-11 11:37:01 UTC (rev 5088)
@@ -76,7 +76,7 @@
 VSC_F_MAIN(n_smf,		uint64_t, 0, 'i', "N struct smf")
 VSC_F_MAIN(n_smf_frag,		uint64_t, 0, 'i', "N small free smf")
 VSC_F_MAIN(n_smf_large,		uint64_t, 0, 'i', "N large free smf")
-VSC_F_MAIN(n_vbe_conn,		uint64_t, 0, 'i', "N struct vbe_conn")
+VSC_F_MAIN(n_vbc,		uint64_t, 0, 'i', "N struct vbc")
 VSC_F_MAIN(n_wrk,		uint64_t, 0, 'i', "N worker threads")
 VSC_F_MAIN(n_wrk_create,	uint64_t, 0, 'a', "N worker threads created")
 VSC_F_MAIN(n_wrk_failed,	uint64_t, 0, 'a',




More information about the varnish-commit mailing list