[4.1] 21ed397 Lock backend counter.

Poul-Henning Kamp phk at FreeBSD.org
Fri Sep 4 15:54:51 CEST 2015


commit 21ed397dd1cba4988e43879fd5b54fea02fd4475
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Jul 27 07:29:35 2015 +0000

    Lock backend counter.
    
    Submitted by:	fgs

diff --git a/bin/varnishd/cache/cache_backend.c b/bin/varnishd/cache/cache_backend.c
index 0591ec7..75adf78 100644
--- a/bin/varnishd/cache/cache_backend.c
+++ b/bin/varnishd/cache/cache_backend.c
@@ -105,6 +105,7 @@ vbe_dir_getfd(struct worker *wrk, struct backend *bp, struct busyobj *bo)
 	Lck_Lock(&bp->mtx);
 	bp->n_conn++;
 	bp->vsc->conn++;
+	bp->vsc->req++;
 	Lck_Unlock(&bp->mtx);
 
 	VTCP_myname(vc->fd, abuf1, sizeof abuf1, pbuf1, sizeof pbuf1);
@@ -112,7 +113,6 @@ vbe_dir_getfd(struct worker *wrk, struct backend *bp, struct busyobj *bo)
 	VSLb(bo->vsl, SLT_BackendOpen, "%d %s %s %s %s %s",
 	    vc->fd, bp->display_name, abuf2, pbuf2, abuf1, pbuf1);
 
-	bp->vsc->req++;
 	INIT_OBJ(bo->htc, HTTP_CONN_MAGIC);
 	bo->htc->priv = vc;
 	bo->htc->fd = vc->fd;



More information about the varnish-commit mailing list