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

Pass a dstat arg to oc->updatemeta()

parent 4c9b521b
......@@ -373,7 +373,7 @@ struct storage {
*/
typedef struct object *getobj_f(struct dstat *ds, struct objcore *oc);
typedef void updatemeta_f(struct objcore *oc);
typedef void updatemeta_f(struct objcore *oc, struct dstat *);
typedef void freeobj_f(struct dstat *ds, struct objcore *oc);
typedef struct lru *getlru_f(const struct objcore *oc);
......@@ -1066,7 +1066,7 @@ void ObjTrimStore(struct objcore *, struct dstat *);
unsigned ObjGetXID(struct objcore *, struct dstat *);
uint64_t ObjGetLen(struct objcore *oc, struct dstat *ds);
struct object *ObjGetObj(struct objcore *, struct dstat *);
void ObjUpdateMeta(struct objcore *);
void ObjUpdateMeta(struct objcore *, struct dstat *);
void ObjFreeObj(struct objcore *, struct dstat *);
struct lru *ObjGetLRU(const struct objcore *);
void *ObjGetattr(struct objcore *oc, struct dstat *ds, enum obj_attr attr,
......
......@@ -963,7 +963,7 @@ BAN_CheckObject(struct worker *wrk, struct objcore *oc, struct req *req)
if (b == oc->ban) { /* not banned */
oc->ban = b0;
ObjUpdateMeta(oc);
ObjUpdateMeta(oc, &wrk->stats);
return (0);
} else {
oc->ban = NULL;
......
......@@ -397,7 +397,7 @@ exp_inbox(struct exp_priv *ep, struct objcore *oc, double now)
o = ObjGetObj(oc, &ep->wrk->stats);
CHECK_OBJ_NOTNULL(o, OBJECT_MAGIC);
oc->timer_when = EXP_When(&oc->exp);
ObjUpdateMeta(oc);
ObjUpdateMeta(oc, &ep->wrk->stats);
}
VSLb(&ep->vsl, SLT_ExpKill, "EXP_When p=%p e=%.9f f=0x%x", oc,
......
......@@ -184,12 +184,12 @@ ObjGetObj(struct objcore *oc, struct dstat *ds)
}
void
ObjUpdateMeta(struct objcore *oc)
ObjUpdateMeta(struct objcore *oc, struct dstat *ds)
{
const struct objcore_methods *m = obj_getmethods(oc);
if (m->updatemeta != NULL)
m->updatemeta(oc);
m->updatemeta(oc, ds);
}
void
......
......@@ -450,14 +450,14 @@ smp_oc_getobj(struct dstat *ds, struct objcore *oc)
}
static void
smp_oc_updatemeta(struct objcore *oc)
smp_oc_updatemeta(struct objcore *oc, struct dstat *ds)
{
struct object *o;
struct smp_seg *sg;
struct smp_object *so;
CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC);
o = smp_oc_getobj(NULL, oc);
o = smp_oc_getobj(ds, oc);
AN(o);
CAST_OBJ_NOTNULL(sg, oc->priv, SMP_SEG_MAGIC);
......
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