[master] aa21e4b I may be incompetent at math, but I'm not _that_ incompetent at math :-)

Nils Goroll nils.goroll at uplex.de
Tue Jan 16 11:04:50 UTC 2018


phk,

I think we are both wrong:

the mapping starts at off = RDN2(of, ps)

The precise length of the mapping is of - off + sz, so if
we round up again to the next page, we get

	len = RUP2(of - off + sz, ps)

RUP2(sz) is too small because (of - off) can make the mapping span another page
boundary.

But RUP2(of + sz, ps) ignores that the mapping starts at off.

Or am I missing anything?


Nils

On 15/01/18 23:15, Poul-Henning Kamp wrote:
> 
> commit aa21e4b2f8c3b884c4a9c32ef74ed5625e4c6916
> Author: Poul-Henning Kamp <phk at FreeBSD.org>
> Date:   Mon Jan 15 22:14:14 2018 +0000
> 
>     I may be incompetent at math, but I'm not _that_ incompetent at math :-)
> 
> diff --git a/lib/libvarnishapi/vsm.c b/lib/libvarnishapi/vsm.c
> index 282865b..cb8118b 100644
> --- a/lib/libvarnishapi/vsm.c
> +++ b/lib/libvarnishapi/vsm.c
> @@ -718,7 +718,7 @@ VSM_Map(struct vsm *vd, struct vsm_fantom *vf)
>  
>  	sz = strtoul(vg->av[3], NULL, 10);
>  	assert(sz > 0);
> -	len = RUP2(sz, ps);
> +	len = RUP2(of + sz, ps);
>  
>  	vsb = VSB_new_auto();
>  	AN(vsb);
> _______________________________________________
> varnish-commit mailing list
> varnish-commit at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit
> 


-- 

** * * UPLEX - Nils Goroll Systemoptimierung

Scheffelstraße 32
22301 Hamburg

tel +49 40 28805731
mob +49 170 2723133
fax +49 40 42949753

xmpp://slink@jabber.int.uplex.de/

http://uplex.de/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-commit/attachments/20180116/5859e6cd/attachment.bin>


More information about the varnish-commit mailing list