r4274 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Sun Oct 4 14:38:52 CEST 2009
Author: phk
Date: 2009-10-04 14:38:52 +0200 (Sun, 04 Oct 2009)
New Revision: 4274
Modified:
trunk/varnish-cache/bin/varnishd/storage_persistent.c
Log:
count fixed recorded objects as fixed.
Use consistent boundary check for end of segment.
Modified: trunk/varnish-cache/bin/varnishd/storage_persistent.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/storage_persistent.c 2009-10-04 12:13:49 UTC (rev 4273)
+++ trunk/varnish-cache/bin/varnishd/storage_persistent.c 2009-10-04 12:38:52 UTC (rev 4274)
@@ -1273,6 +1273,7 @@
sp->obj->smp_index = sg->nalloc2++;
so = &sg->objs[sp->obj->smp_index];
sg->nfixed++;
+ sg->nobj++;
assert(sizeof so->hash == DIGEST_LEN);
memcpy(so->hash, sp->obj->objcore->objhead->digest, DIGEST_LEN);
so->ttl = sp->obj->ttl;
@@ -1323,7 +1324,8 @@
}
/* If there is space, fine */
- if (needed < left && (oc == NULL || sg->nalloc1 < sc->aim_nobj))
+ if (needed <= left &&
+ (oc == NULL || sg->nalloc1 < sc->aim_nobj))
break;
smp_close_seg(sc, sc->cur_seg);
More information about the varnish-commit
mailing list