Allocate object segments for the worst case object size

Fixes another case of #22
parent 41ae0c40
......@@ -2301,9 +2301,15 @@ fellow_busy_body_seg_alloc(struct fellow_busy *fbo,
assert(fbo->sz_estimate > fbo->sz_dskalloc);
spc = fbo->sz_estimate - fbo->sz_dskalloc;
if (fbo->nregion >= FCO_MAX_REGIONS - FCO_REGIONS_RESERVE)
// out of regions: keep spc, no cram
if (fbo->nregion >= FCO_MAX_REGIONS - FCO_REGIONS_RESERVE) {
// out of regions: no cram,
// if grown, assume worst, else keep spc
cram = 0;
if (fbo->grown) {
spc = fbo->fc->tune->objsize_max -
fbo->sz_dskalloc;
}
}
else if (fbo->grown == 0 && (spc >> chunkbits) == 0)
// c-l or initial chunked - keep small req
(void)spc;
......
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