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

Move the ws_o structure from struct obj to busyobj, and shave 48 bytes

off stored objects.

We used to need this in struct obj, so we could munge obj.http, but
we don't allow that any more.
parent a583d0c6
......@@ -565,6 +565,9 @@ struct busyobj {
struct vsl_log vsl[1];
struct dstat *stats;
/* Workspace for object only needed during fetch */
struct ws ws_o[1];
};
/* Object structure --------------------------------------------------*/
......@@ -578,8 +581,6 @@ struct object {
struct storage *objstore;
struct objcore *objcore;
struct ws ws_o[1];
uint8_t *vary;
unsigned hits;
uint16_t response;
......@@ -604,7 +605,6 @@ struct object {
struct storage *esidata;
double last_use;
};
/*--------------------------------------------------------------------*/
......
......@@ -380,7 +380,7 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
obj->vxid = bo->vsl->wid;
obj->response = bo->err_code;
WS_Assert(obj->ws_o);
WS_Assert(bo->ws_o);
/* Filter into object */
hp = bo->beresp;
......@@ -408,7 +408,7 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
AN(obj->objcore->ban);
}
AZ(obj->ws_o->overflow);
AZ(bo->ws_o->overflow);
if (bo->do_stream)
HSH_Unbusy(&wrk->stats, obj->objcore);
......
......@@ -208,7 +208,6 @@ pan_object(const struct object *o)
VSB_printf(pan_vsp, " obj = %p {\n", o);
VSB_printf(pan_vsp, " vxid = %u,\n", o->vxid);
pan_ws(o->ws_o, 4);
pan_http("obj", o->http, 4);
VSB_printf(pan_vsp, " len = %jd,\n", (intmax_t)o->len);
VSB_printf(pan_vsp, " store = {\n");
......@@ -279,6 +278,7 @@ pan_busyobj(const struct busyobj *bo)
pan_http("bereq", bo->bereq, 4);
if (bo->beresp->ws != NULL)
pan_http("beresp", bo->beresp, 4);
pan_ws(bo->ws_o, 4);
VSB_printf(pan_vsp, " }\n");
}
......
......@@ -277,11 +277,11 @@ STV_MkObject(struct stevedore *stv, struct busyobj *bo,
assert(l >= soc->wsl);
o->http = HTTP_create(o + 1, soc->nhttp);
WS_Init(o->ws_o, "obj", (char *)(o + 1) + soc->lhttp, soc->wsl);
WS_Assert(o->ws_o);
assert(o->ws_o->e <= (char*)ptr + ltot);
WS_Init(bo->ws_o, "obj", (char *)(o + 1) + soc->lhttp, soc->wsl);
WS_Assert(bo->ws_o);
assert(bo->ws_o->e <= (char*)ptr + ltot);
HTTP_Setup(o->http, o->ws_o, bo->vsl, HTTP_Obj);
HTTP_Setup(o->http, bo->ws_o, bo->vsl, HTTP_Obj);
o->http->magic = HTTP_MAGIC;
o->exp = bo->exp;
VTAILQ_INIT(&o->store);
......
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