[PATCH 2/2] Rename req->ims_oc to req->stale_oc
Martin Blix Grydeland
martin at varnish-software.com
Thu Feb 5 14:00:48 CET 2015
This to better reflect it's role as a stale reference that should be
passed to the fetch thread.
---
bin/varnishd/cache/cache.h | 2 +-
bin/varnishd/cache/cache_req_fsm.c | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h
index f758909..faaaf4f 100644
--- a/bin/varnishd/cache/cache.h
+++ b/bin/varnishd/cache/cache.h
@@ -610,7 +610,7 @@ struct req {
struct ws ws[1];
struct objcore *objcore;
- struct objcore *ims_oc;
+ struct objcore *stale_oc;
/* Lookup stuff */
struct SHA256Context *sha256ctx;
diff --git a/bin/varnishd/cache/cache_req_fsm.c b/bin/varnishd/cache/cache_req_fsm.c
index e080eee..aa737d9 100644
--- a/bin/varnishd/cache/cache_req_fsm.c
+++ b/bin/varnishd/cache/cache_req_fsm.c
@@ -371,7 +371,7 @@ cnt_lookup(struct worker *wrk, struct req *req)
case VCL_RET_FETCH:
if (boc != NULL) {
req->objcore = boc;
- req->ims_oc = oc;
+ req->stale_oc = oc;
req->req_step = R_STP_MISS;
} else {
(void)HSH_DerefObjCore(wrk, &req->objcore);
@@ -428,10 +428,10 @@ cnt_miss(struct worker *wrk, struct req *req)
switch (wrk->handling) {
case VCL_RET_FETCH:
wrk->stats->cache_miss++;
- VBF_Fetch(wrk, req, req->objcore, req->ims_oc, VBF_NORMAL);
+ VBF_Fetch(wrk, req, req->objcore, req->stale_oc, VBF_NORMAL);
req->req_step = R_STP_FETCH;
- if (req->ims_oc != NULL)
- (void)HSH_DerefObjCore(wrk, &req->ims_oc);
+ if (req->stale_oc != NULL)
+ (void)HSH_DerefObjCore(wrk, &req->stale_oc);
return (REQ_FSM_MORE);
case VCL_RET_SYNTH:
req->req_step = R_STP_SYNTH;
@@ -446,8 +446,8 @@ cnt_miss(struct worker *wrk, struct req *req)
WRONG("Illegal return from vcl_miss{}");
}
VRY_Clear(req);
- if (req->ims_oc != NULL)
- (void)HSH_DerefObjCore(wrk, &req->ims_oc);
+ if (req->stale_oc != NULL)
+ (void)HSH_DerefObjCore(wrk, &req->stale_oc);
AZ(HSH_DerefObjCore(wrk, &req->objcore));
return (REQ_FSM_MORE);
}
--
2.1.4
More information about the varnish-dev
mailing list