fellow_cache: Fix calculation of required number of segments

it needs to be based on the space to be returned, not on the space to be still
allocated on disk.
parent bf0bbde1
......@@ -2814,7 +2814,7 @@ fellow_busy_body_seglist_alloc(struct fellow_busy *fbo,
* sz is number of segments
*/
if (fbo->grown && fbo->body_seglist != fbo->fco->fcsl) {
sz = fbo->fc->tune->objsize_max - fbo->sz_dskalloc;
sz = fbo->fc->tune->objsize_max - fbo->sz_returned;
sz += (((size_t)1 << MIN_FELLOW_BITS) - 1);
sz >>= MIN_FELLOW_BITS;
// can not apply strategy because we could hit FCO_MAX_REGIONS
......
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