[master] 9ab56d3 Mask out the identity type from the xid before VSL'ing.

Poul-Henning Kamp phk at varnish-cache.org
Tue May 28 11:51:05 CEST 2013


commit 9ab56d334fa73cd530089c2ccd98bb2c9b9bd7b5
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue May 28 09:50:43 2013 +0000

    Mask out the identity type from the xid before VSL'ing.

diff --git a/bin/varnishd/cache/cache_expire.c b/bin/varnishd/cache/cache_expire.c
index 80c630f..2271949 100644
--- a/bin/varnishd/cache/cache_expire.c
+++ b/bin/varnishd/cache/cache_expire.c
@@ -409,7 +409,8 @@ exp_timer(struct worker *wrk, void *priv)
 		CHECK_OBJ_NOTNULL(oc->objhead, OBJHEAD_MAGIC);
 		o = oc_getobj(&wrk->stats, oc);
 		VSLb(&vsl, SLT_ExpKill, "%u %.0f",
-		    oc_getxid(&wrk->stats, oc), EXP_Ttl(NULL, o) - t);
+		    oc_getxid(&wrk->stats, oc) & VSL_IDENTMASK,
+		    EXP_Ttl(NULL, o) - t);
 		(void)HSH_Deref(&wrk->stats, oc, NULL);
 	}
 	NEEDLESS_RETURN(NULL);
@@ -454,7 +455,8 @@ EXP_NukeOne(struct busyobj *bo, struct lru *lru)
 		return (-1);
 
 	/* XXX: bad idea for -spersistent */
-	VSLb(bo->vsl, SLT_ExpKill, "%u LRU", oc_getxid(bo->stats, oc));
+	VSLb(bo->vsl, SLT_ExpKill, "%u LRU",
+	    oc_getxid(bo->stats, oc) & VSL_IDENTMASK);
 	(void)HSH_Deref(bo->stats, oc, NULL);
 	return (1);
 }
@@ -508,7 +510,8 @@ EXP_NukeLRU(struct worker *wrk, struct vsl_log *vsl, struct lru *lru)
 			oc = oc_array[i];
 			o = oc_getobj(&wrk->stats, oc);
 			VSLb(vsl, SLT_ExpKill, "%u %.0f LRU",
-			     oc_getxid(&wrk->stats, oc), EXP_Ttl(NULL, o) - t);
+			    oc_getxid(&wrk->stats, oc) & VSL_IDENTMASK,
+			    EXP_Ttl(NULL, o) - t);
 			EXP_Set_ttl(&o->exp, 0.);
 			(void)HSH_Deref(&wrk->stats, oc, NULL);
 		}



More information about the varnish-commit mailing list