Commit e359508e authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Move the pass flag from the object to the objcore.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@3778 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent b7490cca
...@@ -268,6 +268,7 @@ struct objcore { ...@@ -268,6 +268,7 @@ struct objcore {
unsigned char flags; unsigned char flags;
#define OC_F_ONLRU (1<<0) #define OC_F_ONLRU (1<<0)
#define OC_F_BUSY (1<<1) #define OC_F_BUSY (1<<1)
#define OC_F_PASS (1<<2)
unsigned timer_idx; unsigned timer_idx;
VTAILQ_ENTRY(objcore) list; VTAILQ_ENTRY(objcore) list;
VTAILQ_ENTRY(objcore) lru_list; VTAILQ_ENTRY(objcore) lru_list;
...@@ -289,8 +290,6 @@ struct object { ...@@ -289,8 +290,6 @@ struct object {
struct ban *ban; struct ban *ban;
unsigned pass;
unsigned response; unsigned response;
unsigned cacheable; unsigned cacheable;
......
/*- /*-
* Copyright (c) 2006 Verdens Gang AS * Copyright (c) 2006 Verdens Gang AS
* Copyright (c) 2006-2008 Linpro AS * Copyright (c) 2006-2009 Linpro AS
* All rights reserved. * All rights reserved.
* *
* Author: Poul-Henning Kamp <phk@phk.freebsd.dk> * Author: Poul-Henning Kamp <phk@phk.freebsd.dk>
...@@ -414,7 +414,8 @@ cnt_fetch(struct sess *sp) ...@@ -414,7 +414,8 @@ cnt_fetch(struct sess *sp)
sp->step = STP_RECV; sp->step = STP_RECV;
return (0); return (0);
case VCL_RET_PASS: case VCL_RET_PASS:
sp->obj->pass = 1; if (sp->obj->objcore != NULL)
sp->obj->objcore->flags |= OC_F_PASS;
if (sp->obj->ttl - sp->t_req < params->default_ttl) if (sp->obj->ttl - sp->t_req < params->default_ttl)
sp->obj->ttl = sp->t_req + params->default_ttl; sp->obj->ttl = sp->t_req + params->default_ttl;
break; break;
...@@ -514,7 +515,7 @@ cnt_hit(struct sess *sp) ...@@ -514,7 +515,7 @@ cnt_hit(struct sess *sp)
CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC); CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC);
CHECK_OBJ_NOTNULL(sp->vcl, VCL_CONF_MAGIC); CHECK_OBJ_NOTNULL(sp->vcl, VCL_CONF_MAGIC);
assert(!sp->obj->pass); assert(!(sp->obj->objcore->flags & OC_F_PASS));
VCL_hit_method(sp); VCL_hit_method(sp);
...@@ -607,7 +608,7 @@ cnt_lookup(struct sess *sp) ...@@ -607,7 +608,7 @@ cnt_lookup(struct sess *sp)
return (0); return (0);
} }
if (sp->obj->pass) { if (sp->obj->objcore->flags & OC_F_PASS) {
VSL_stats->cache_hitpass++; VSL_stats->cache_hitpass++;
WSP(sp, SLT_HitPass, "%u", sp->obj->xid); WSP(sp, SLT_HitPass, "%u", sp->obj->xid);
HSH_Deref(&sp->obj); HSH_Deref(&sp->obj);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment