|
|
@ -274,11 +274,14 @@ static int drop_client(cdata_t *cdata, client_instance_t *client) |
|
|
|
return fd; |
|
|
|
return fd; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void stratifier_drop_client(ckpool_t *ckp, int64_t id) |
|
|
|
static void stratifier_drop_client(ckpool_t *ckp, const client_instance_t *client) |
|
|
|
{ |
|
|
|
{ |
|
|
|
char buf[256]; |
|
|
|
char buf[256]; |
|
|
|
|
|
|
|
|
|
|
|
sprintf(buf, "dropclient=%"PRId64, id); |
|
|
|
/* The stratifier is not in use in passthrough mode */ |
|
|
|
|
|
|
|
if (ckp->passthrough || client->passthrough) |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
sprintf(buf, "dropclient=%"PRId64, client->id); |
|
|
|
send_proc(ckp->stratifier, buf); |
|
|
|
send_proc(ckp->stratifier, buf); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -292,9 +295,7 @@ static int invalidate_client(ckpool_t *ckp, cdata_t *cdata, client_instance_t *c |
|
|
|
int ret; |
|
|
|
int ret; |
|
|
|
|
|
|
|
|
|
|
|
ret = drop_client(cdata, client); |
|
|
|
ret = drop_client(cdata, client); |
|
|
|
if (ckp->passthrough) |
|
|
|
stratifier_drop_client(ckp, client); |
|
|
|
goto out; |
|
|
|
|
|
|
|
stratifier_drop_client(ckp, client->id); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Cull old unused clients lazily when there are no more reference
|
|
|
|
/* Cull old unused clients lazily when there are no more reference
|
|
|
|
* counts for them. */ |
|
|
|
* counts for them. */ |
|
|
@ -308,7 +309,6 @@ static int invalidate_client(ckpool_t *ckp, cdata_t *cdata, client_instance_t *c |
|
|
|
} |
|
|
|
} |
|
|
|
ck_wunlock(&cdata->lock); |
|
|
|
ck_wunlock(&cdata->lock); |
|
|
|
|
|
|
|
|
|
|
|
out: |
|
|
|
|
|
|
|
return ret; |
|
|
|
return ret; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|