[6.0] 79231c306 Adjust the segment length for the cluster allocation offset

Martin Blix Grydeland martin at varnish-software.com
Fri Oct 18 13:23:08 UTC 2019


commit 79231c3062811ad1b916e0bb55559a38cfb6ae60
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date:   Wed Sep 4 17:54:54 2019 +0200

    Adjust the segment length for the cluster allocation offset
    
    Clusters VSM allocations start at offset 16. Make sure that the published
    segment includes that adjustment.

diff --git a/bin/varnishd/common/common_vsmw.c b/bin/varnishd/common/common_vsmw.c
index 9742f8b25..5149b8bfb 100644
--- a/bin/varnishd/common/common_vsmw.c
+++ b/bin/varnishd/common/common_vsmw.c
@@ -321,7 +321,7 @@ VSMW_NewCluster(struct vsmw *vsmw, size_t len, const char *pfx)
 	ALLOC_OBJ(seg, VSMWSEG_MAGIC);
 	AN(seg);
 	vc->cseg = seg;
-	seg->len = len;
+	seg->len = vc->len;
 	seg->cluster = vc;
 	REPLACE(seg->class, "");
 	REPLACE(seg->id, "");


More information about the varnish-commit mailing list