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

Lend the worker a pointer to req/bo's vsl to allow us to simplify some

function arguments.
parent c7392680
......@@ -349,6 +349,7 @@ struct worker {
struct busyobj *nbo;
void *nhashpriv;
struct dstat stats[1];
struct vsl_log *vsl; // borrowed from req/bo
struct pool_task task;
......@@ -468,6 +469,7 @@ struct busyobj {
unsigned refcount;
int retries;
struct req *req;
struct worker *wrk;
uint8_t *vary;
......
......@@ -858,6 +858,8 @@ vbf_fetch_thread(struct worker *wrk, void *priv)
VSLb_ts_busyobj(bo, "Start", W_TIM_real(wrk));
bo->stats = wrk->stats;
bo->wrk = wrk;
wrk->vsl = bo->vsl;
while (stp != F_STP_DONE) {
CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
......@@ -899,6 +901,7 @@ vbf_fetch_thread(struct worker *wrk, void *priv)
bo->stats = NULL;
wrk->vsl = NULL;
VBO_DerefBusyObj(wrk, &bo);
THR_SetBusyobj(NULL);
}
......
......@@ -363,6 +363,7 @@ Pool_Work_Thread(void *priv, struct worker *wrk)
CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
WS_Reset(wrk->aws, NULL);
AZ(wrk->vsl);
tp = VTAILQ_FIRST(&pp->front_queue);
if (tp != NULL) {
......
......@@ -880,6 +880,7 @@ CNT_Request(struct worker *wrk, struct req *req)
AN(req->vsl->wid & VSL_CLIENTMARKER);
req->wrk = wrk;
wrk->vsl = req->vsl;
for (nxt = REQ_FSM_MORE; nxt == REQ_FSM_MORE; ) {
/*
......@@ -913,6 +914,7 @@ CNT_Request(struct worker *wrk, struct req *req)
WS_Assert(wrk->aws);
CHECK_OBJ_ORNULL(wrk->nobjhead, OBJHEAD_MAGIC);
}
wrk->vsl = NULL;
if (nxt == REQ_FSM_DONE) {
AN(req->vsl->wid);
if (req->res_mode & (RES_ESI|RES_ESI_CHILD))
......
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