[master] 5d4e2ce Move VGZ entirely to busyobj instead of worker
Poul-Henning Kamp
phk at varnish-cache.org
Wed Feb 15 13:58:01 CET 2012
commit 5d4e2cee84c088e52f4c79b11a11c305b4d49526
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Wed Feb 15 12:57:48 2012 +0000
Move VGZ entirely to busyobj instead of worker
diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h
index 74a8b5d..a47edf1 100644
--- a/bin/varnishd/cache/cache.h
+++ b/bin/varnishd/cache/cache.h
@@ -766,7 +766,7 @@ void VGZ_Ibuf(struct vgz *, const void *, ssize_t len);
int VGZ_IbufEmpty(const struct vgz *vg);
void VGZ_Obuf(struct vgz *, void *, ssize_t len);
int VGZ_ObufFull(const struct vgz *vg);
-int VGZ_ObufStorage(struct worker *w, struct vgz *vg);
+int VGZ_ObufStorage(struct busyobj *, struct vgz *vg);
int VGZ_Gzip(struct vgz *, const void **, size_t *len, enum vgz_flag);
int VGZ_Gunzip(struct vgz *, const void **, size_t *len);
int VGZ_Destroy(struct vgz **);
diff --git a/bin/varnishd/cache/cache_esi_fetch.c b/bin/varnishd/cache/cache_esi_fetch.c
index c16568a..a53ccc7 100644
--- a/bin/varnishd/cache/cache_esi_fetch.c
+++ b/bin/varnishd/cache/cache_esi_fetch.c
@@ -135,7 +135,7 @@ vfp_esi_bytes_gu(struct worker *wrk, const struct vef_priv *vef,
VGZ_Ibuf(vg, vef->ibuf, wl);
bytes -= wl;
}
- if (VGZ_ObufStorage(wrk, vg))
+ if (VGZ_ObufStorage(wrk->busyobj, vg))
return(-1);
i = VGZ_Gunzip(vg, &dp, &dl);
xxxassert(i == VGZ_OK || i == VGZ_END);
@@ -211,7 +211,7 @@ vfp_vep_callback(struct worker *wrk, ssize_t l, enum vgz_flag flg)
VGZ_Ibuf(vef->vgz, vef->ibuf_o, l);
do {
- if (VGZ_ObufStorage(wrk, vef->vgz)) {
+ if (VGZ_ObufStorage(wrk->busyobj, vef->vgz)) {
vef->error = ENOMEM;
vef->tot += l;
return (vef->tot);
diff --git a/bin/varnishd/cache/cache_gzip.c b/bin/varnishd/cache/cache_gzip.c
index c2764b5..1dd7942 100644
--- a/bin/varnishd/cache/cache_gzip.c
+++ b/bin/varnishd/cache/cache_gzip.c
@@ -203,11 +203,11 @@ VGZ_ObufFull(const struct vgz *vg)
*/
int
-VGZ_ObufStorage(struct worker *wrk, struct vgz *vg)
+VGZ_ObufStorage(struct busyobj *bo, struct vgz *vg)
{
struct storage *st;
- st = FetchStorage(wrk->busyobj, 0);
+ st = FetchStorage(bo, 0);
if (st == NULL)
return (-1);
@@ -466,7 +466,7 @@ vfp_gunzip_bytes(struct worker *wrk, struct http_conn *htc, ssize_t bytes)
bytes -= wl;
}
- if (VGZ_ObufStorage(wrk, vg))
+ if (VGZ_ObufStorage(wrk->busyobj, vg))
return(-1);
i = VGZ_Gunzip(vg, &dp, &dl);
if (i != VGZ_OK && i != VGZ_END)
@@ -547,7 +547,7 @@ vfp_gzip_bytes(struct worker *wrk, struct http_conn *htc, ssize_t bytes)
VGZ_Ibuf(vg, vg->m_buf, wl);
bytes -= wl;
}
- if (VGZ_ObufStorage(wrk, vg))
+ if (VGZ_ObufStorage(wrk->busyobj, vg))
return(-1);
i = VGZ_Gzip(vg, &dp, &dl, VGZ_NORMAL);
assert(i == Z_OK);
@@ -575,7 +575,7 @@ vfp_gzip_end(struct worker *wrk)
}
do {
VGZ_Ibuf(vg, "", 0);
- if (VGZ_ObufStorage(wrk, vg))
+ if (VGZ_ObufStorage(wrk->busyobj, vg))
return(-1);
i = VGZ_Gzip(vg, &dp, &dl, VGZ_FINISH);
wrk->busyobj->fetch_obj->len += dl;
More information about the varnish-commit
mailing list