Commit a9d35b47 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Clarify comment, add assert + comment

parent 7d164e06
......@@ -572,9 +572,8 @@ FetchBody(struct worker *wrk, struct object *obj)
AZ(bo->vgz_rx);
/*
* It is OK for ->end to just leave the last storage segment
* sitting on wrk->storage, we will always call vfp_nop_end()
* to get it trimmed or thrown out if empty.
* We always call vfp_nop_end() to ditch or trim the last storage
* segment, to avoid having to replicate that code in all vfp's.
*/
AZ(vfp_nop_end(bo));
......
......@@ -177,6 +177,8 @@ stv_alloc(struct busyobj *bo, size_t size)
if (size > cache_param->fetch_maxchunksize)
size = cache_param->fetch_maxchunksize;
assert(size <= UINT_MAX); /* field limit in struct storage */
for (;;) {
/* try to allocate from it */
AN(stv->alloc);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment