Commit 90b82673 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Retire various struct object related infrastructure.

parent bdc6f734
......@@ -1058,7 +1058,6 @@ ban_lurker_test_ban(struct worker *wrk, struct vsl_log *vsl, struct ban *bt,
{
struct ban *bl, *bln;
struct objcore *oc;
struct object *o;
unsigned tests;
int i;
......@@ -1081,8 +1080,6 @@ ban_lurker_test_ban(struct worker *wrk, struct vsl_log *vsl, struct ban *bt,
oc = ban_lurker_getfirst(vsl, bt);
if (oc == NULL)
return;
o = ObjGetObj(oc, &wrk->stats);
CHECK_OBJ_NOTNULL(o, OBJECT_MAGIC);
i = 0;
VTAILQ_FOREACH_REVERSE_SAFE(bl, obans, banhead_s, l_list, bln) {
if (bl->flags & BANS_FLAG_COMPLETED) {
......
......@@ -178,29 +178,6 @@ cli_debug_sizeof(struct cli *cli, const char * const *av, void *priv)
OFOF(struct storage, len);
OFOF(struct storage, space);
#endif
#if 0
OFOF(struct object, magic);
OFOF(struct object, xid);
OFOF(struct object, objstore);
OFOF(struct object, objcore);
OFOF(struct object, ws_o);
OFOF(struct object, vary);
OFOF(struct object, hits);
OFOF(struct object, response);
OFOF(struct object, gziped);
OFOF(struct object, gzip_start);
OFOF(struct object, gzip_last);
OFOF(struct object, gzip_stop);
OFOF(struct object, len);
OFOF(struct object, age);
OFOF(struct object, entered);
OFOF(struct object, exp);
OFOF(struct object, last_modified);
OFOF(struct object, last_lru);
OFOF(struct object, http);
OFOF(struct object, store);
OFOF(struct object, esidata);
#endif
#undef OFOF
#endif
}
......
......@@ -353,7 +353,6 @@ exp_inbox(struct exp_priv *ep, struct objcore *oc, double now)
{
unsigned flags;
struct lru *lru;
struct object *o;
CHECK_OBJ_NOTNULL(ep, EXP_PRIV_MAGIC);
CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC);
......@@ -391,8 +390,6 @@ exp_inbox(struct exp_priv *ep, struct objcore *oc, double now)
}
if (flags & OC_EF_MOVE) {
o = ObjGetObj(oc, &ep->wrk->stats);
CHECK_OBJ_NOTNULL(o, OBJECT_MAGIC);
oc->timer_when = EXP_When(&oc->exp);
ObjUpdateMeta(oc, &ep->wrk->stats);
}
......@@ -428,7 +425,6 @@ exp_expire(struct exp_priv *ep, double now)
{
struct lru *lru;
struct objcore *oc;
struct object *o;
CHECK_OBJ_NOTNULL(ep, EXP_PRIV_MAGIC);
......@@ -466,8 +462,6 @@ exp_expire(struct exp_priv *ep, double now)
assert(oc->timer_idx == BINHEAP_NOIDX);
CHECK_OBJ_NOTNULL(oc->objhead, OBJHEAD_MAGIC);
o = ObjGetObj(oc, &ep->wrk->stats);
CHECK_OBJ_NOTNULL(o, OBJECT_MAGIC);
VSLb(&ep->vsl, SLT_ExpKill, "EXP_Expired x=%u t=%.0f",
ObjGetXID(oc, &ep->wrk->stats),
EXP_Ttl(NULL, &oc->exp) - now);
......
......@@ -609,22 +609,6 @@ double keep)
Pool_PurgeStat(nobj);
}
/*---------------------------------------------------------------------
* Kill a busy object we don't need and can't use.
*/
void
HSH_Drop(struct worker *wrk, struct object **oo)
{
CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
AN(oo);
CHECK_OBJ_NOTNULL(*oo, OBJECT_MAGIC);
(*oo)->objcore->exp.ttl = -1.;
AZ(HSH_DerefObj(&wrk->stats, oo));
}
/*---------------------------------------------------------------------
* Fail an objcore
*/
......@@ -747,34 +731,11 @@ HSH_RefBusy(const struct objcore *oc)
}
/*--------------------------------------------------------------------
* Dereference objcore and or object
*
* Can deal with:
* bare objcore (incomplete fetch)
* bare object (pass)
* object with objcore
* XXX later: objcore with object (?)
*
* But you can only supply one of the two arguments at a time.
* Dereference objcore
*
* Returns zero if target was destroyed.
*/
int
HSH_DerefObj(struct dstat *ds, struct object **oo)
{
struct object *o;
struct objcore *oc;
AN(oo);
o = *oo;
*oo = NULL;
CHECK_OBJ_NOTNULL(o, OBJECT_MAGIC);
oc = o->objcore;
return (HSH_DerefObjCore(ds, &oc));
}
int
HSH_DerefObjCore(struct dstat *ds, struct objcore **ocp)
{
......
......@@ -66,7 +66,6 @@ void HSH_Cleanup(struct worker *w);
enum lookup_e HSH_Lookup(struct req *, struct objcore **, struct objcore **,
int wait_for_busy, int always_insert);
void HSH_Ref(struct objcore *o);
void HSH_Drop(struct worker *, struct object **);
void HSH_Init(const struct hash_slinger *slinger);
void HSH_AddString(const struct req *, const char *str);
void HSH_Insert(struct worker *, const void *hash, struct objcore *);
......@@ -117,7 +116,6 @@ void HSH_Complete(struct objcore *oc);
void HSH_DeleteObjHead(struct dstat *, struct objhead *oh);
int HSH_DerefObjHead(struct dstat *, struct objhead **poh);
int HSH_DerefObjCore(struct dstat *, struct objcore **ocp);
int HSH_DerefObj(struct dstat *, struct object **o);
#endif /* VARNISH_CACHE_CHILD */
extern const struct hash_slinger hsl_slinger;
......
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