[master] 042a2d6 Don't always check the sign after smp_append_sign().

Martin Blix Grydeland martin at varnish-cache.org
Wed Nov 7 12:21:40 CET 2012


commit 042a2d631c5f5a697cd0951eba276401f09bb957
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date:   Wed Oct 3 15:08:14 2012 +0200

    Don't always check the sign after smp_append_sign().
    
    Remove the XXXAZ(smp_chk_sign) after smp_append_sign(), as it causes
    heavy unnecessary CPU usage after each sign update. No assertion
    reports have come from this test, so there is no reason to expect the
    signs not working.

diff --git a/bin/varnishd/storage/storage_persistent_subr.c b/bin/varnishd/storage/storage_persistent_subr.c
index 0b1b7da..0589af9 100644
--- a/bin/varnishd/storage/storage_persistent_subr.c
+++ b/bin/varnishd/storage/storage_persistent_subr.c
@@ -128,7 +128,6 @@ smp_append_sign(struct smp_signctx *ctx, const void *ptr, uint32_t len)
 	SHA256_Update(&cx, &ctx->ss->length, sizeof(ctx->ss->length));
 	SHA256_Final(sign, &cx);
 	memcpy(SIGN_END(ctx), sign, sizeof sign);
-XXXAZ(smp_chk_sign(ctx));
 }
 
 /*--------------------------------------------------------------------



More information about the varnish-commit mailing list