[6.0] 58d10b093 rename OC_F_PASS -> OC_F_HFM - zero code change
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Fri Feb 8 13:13:09 UTC 2019
commit 58d10b0936fa659a6d7954707b9845d82f51f13a
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Mon Dec 3 21:11:05 2018 +0100
rename OC_F_PASS -> OC_F_HFM - zero code change
Now that we got hit-for-pass (hfp) and hit-for-miss (hfm), we should
name the latter consistently to avoid unnecessary confusion
diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index be6dc162c..4193c4e2c 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -127,7 +127,7 @@ vbf_beresp2obj(struct busyobj *bo)
l += l2;
if (bo->uncacheable)
- bo->fetch_objcore->flags |= OC_F_PASS;
+ bo->fetch_objcore->flags |= OC_F_HFM;
if (!vbf_allocobj(bo, l)) {
if (vary != NULL)
@@ -196,7 +196,7 @@ vbf_stp_mkbereq(struct worker *wrk, struct busyobj *bo)
if (bo->stale_oc != NULL &&
ObjCheckFlag(bo->wrk, bo->stale_oc, OF_IMSCAND) &&
(bo->stale_oc->boc != NULL || ObjGetLen(wrk, bo->stale_oc) != 0)) {
- AZ(bo->stale_oc->flags & (OC_F_PASS|OC_F_PRIVATE));
+ AZ(bo->stale_oc->flags & (OC_F_HFM|OC_F_PRIVATE));
q = HTTP_GetHdrPack(bo->wrk, bo->stale_oc, H_Last_Modified);
if (q != NULL)
http_PrintfHeader(bo->bereq0,
@@ -355,7 +355,7 @@ vbf_stp_startfetch(struct worker *wrk, struct busyobj *bo)
if (http_IsStatus(bo->beresp, 304)) {
if (bo->stale_oc != NULL &&
ObjCheckFlag(bo->wrk, bo->stale_oc, OF_IMSCAND)) {
- AZ(bo->stale_oc->flags & (OC_F_PASS|OC_F_PRIVATE));
+ AZ(bo->stale_oc->flags & (OC_F_HFM|OC_F_PRIVATE));
if (ObjCheckFlag(bo->wrk, bo->stale_oc, OF_CHGGZIP)) {
/*
* If we changed the gzip status of the object
@@ -418,7 +418,7 @@ vbf_stp_startfetch(struct worker *wrk, struct busyobj *bo)
wrk->handling = VCL_RET_DELIVER;
}
if (bo->do_pass || bo->uncacheable)
- bo->fetch_objcore->flags |= OC_F_PASS;
+ bo->fetch_objcore->flags |= OC_F_HFM;
assert(wrk->handling == VCL_RET_DELIVER);
@@ -454,7 +454,7 @@ vbf_stp_fetchbody(struct worker *wrk, struct busyobj *bo)
* We don't fail the fetch, in order for HitMiss
* objects to be created.
*/
- AN(vfc->oc->flags & OC_F_PASS);
+ AN(vfc->oc->flags & OC_F_HFM);
VSLb(wrk->vsl, SLT_Debug,
"Fetch: Pass delivery abandoned");
bo->htc->doclose = SC_RX_BODY;
@@ -608,7 +608,7 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
ObjSetFlag(bo->wrk, bo->fetch_objcore, OF_##U, 1);
#include "tbl/obj_attr.h"
- if (!(bo->fetch_objcore->flags & OC_F_PASS) &&
+ if (!(bo->fetch_objcore->flags & OC_F_HFM) &&
http_IsStatus(bo->beresp, 200) && (
http_GetHdr(bo->beresp, H_Last_Modified, &p) ||
http_GetHdr(bo->beresp, H_ETag, &p)))
diff --git a/bin/varnishd/cache/cache_hash.c b/bin/varnishd/cache/cache_hash.c
index bb32d4fc2..f8029cb98 100644
--- a/bin/varnishd/cache/cache_hash.c
+++ b/bin/varnishd/cache/cache_hash.c
@@ -445,7 +445,7 @@ HSH_Lookup(struct req *req, struct objcore **ocp, struct objcore **bocp,
ObjGetXID(wrk, oc), EXP_Dttl(req, oc));
oc = NULL;
retval = HSH_MISS;
- } else if (oc->flags & OC_F_PASS) {
+ } else if (oc->flags & OC_F_HFM) {
wrk->stats->cache_hitmiss++;
VSLb(req->vsl, SLT_HitMiss, "%u %.6f",
ObjGetXID(wrk, oc), EXP_Dttl(req, oc));
@@ -472,7 +472,7 @@ HSH_Lookup(struct req *req, struct objcore **ocp, struct objcore **bocp,
}
}
- if (exp_oc != NULL && exp_oc->flags & OC_F_PASS) {
+ if (exp_oc != NULL && exp_oc->flags & OC_F_HFM) {
wrk->stats->cache_hitmiss++;
VSLb(req->vsl, SLT_HitMiss, "%u %.6f", ObjGetXID(wrk, exp_oc),
EXP_Dttl(req, exp_oc));
diff --git a/bin/varnishd/cache/cache_req_fsm.c b/bin/varnishd/cache/cache_req_fsm.c
index cd01c2976..cafdd010f 100644
--- a/bin/varnishd/cache/cache_req_fsm.c
+++ b/bin/varnishd/cache/cache_req_fsm.c
@@ -401,7 +401,7 @@ cnt_transmit(struct worker *wrk, struct req *req)
http_Unset(req->resp, H_Content_Length);
} else if (clval >= 0 && clval == req->resp_len) {
/* Reuse C-L header */
- } else if (head && req->objcore->flags & OC_F_PASS) {
+ } else if (head && req->objcore->flags & OC_F_HFM) {
/*
* Don't touch C-L header (debatable)
*
@@ -423,9 +423,9 @@ cnt_transmit(struct worker *wrk, struct req *req)
VSLb_ts_req(req, "Resp", W_TIM_real(wrk));
- if (req->objcore->flags & (OC_F_PRIVATE | OC_F_PASS | OC_F_HFP)) {
+ if (req->objcore->flags & (OC_F_PRIVATE | OC_F_HFM | OC_F_HFP)) {
if (req->objcore->flags & OC_F_HFP)
- AN(req->objcore->flags & OC_F_PASS);
+ AN(req->objcore->flags & OC_F_HFM);
if (boc != NULL) {
HSH_Abandon(req->objcore);
ObjWaitState(req->objcore, BOS_FINISHED);
@@ -534,7 +534,7 @@ cnt_lookup(struct worker *wrk, struct req *req)
CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC);
AZ(oc->flags & OC_F_BUSY);
req->objcore = oc;
- AZ(oc->flags & OC_F_PASS);
+ AZ(oc->flags & OC_F_HFM);
VSLb(req->vsl, SLT_Hit, "%u %.6f %.6f %.6f",
ObjGetXID(wrk, req->objcore),
@@ -547,7 +547,7 @@ cnt_lookup(struct worker *wrk, struct req *req)
switch (wrk->handling) {
case VCL_RET_DELIVER:
if (busy != NULL) {
- AZ(oc->flags & OC_F_PASS);
+ AZ(oc->flags & OC_F_HFM);
CHECK_OBJ_NOTNULL(busy->boc, BOC_MAGIC);
// XXX: shouldn't we go to miss?
VBF_Fetch(wrk, req, busy, oc, VBF_BACKGROUND);
diff --git a/bin/varnishd/cache/cache_vrt_var.c b/bin/varnishd/cache/cache_vrt_var.c
index 405bb4310..d3787b193 100644
--- a/bin/varnishd/cache/cache_vrt_var.c
+++ b/bin/varnishd/cache/cache_vrt_var.c
@@ -823,7 +823,7 @@ VRT_r_obj_uncacheable(VRT_CTX)
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
CHECK_OBJ_NOTNULL(ctx->req, REQ_MAGIC);
CHECK_OBJ_NOTNULL(ctx->req->objcore, OBJCORE_MAGIC);
- return (ctx->req->objcore->flags & OC_F_PASS ? 1 : 0);
+ return (ctx->req->objcore->flags & OC_F_HFM ? 1 : 0);
}
/*--------------------------------------------------------------------*/
diff --git a/include/tbl/oc_flags.h b/include/tbl/oc_flags.h
index fc8788b64..84fd86f80 100644
--- a/include/tbl/oc_flags.h
+++ b/include/tbl/oc_flags.h
@@ -30,7 +30,7 @@
OC_FLAG(PURGED, purged, (1<<0)) //lint !e835
OC_FLAG(BUSY, busy, (1<<1))
-OC_FLAG(PASS, pass, (1<<2))
+OC_FLAG(HFM, hfm, (1<<2))
OC_FLAG(HFP, hfp, (1<<3))
OC_FLAG(ABANDON, abandon, (1<<4))
OC_FLAG(PRIVATE, private, (1<<5))
More information about the varnish-commit
mailing list