fellow_logcache: do not cram flc allocation

parent 5759e346
......@@ -1167,8 +1167,7 @@ fellow_logcache_init(struct fellow_logcache *flc, struct fellow_fd *ffd,
struct fellow_logcache_entry *fle;
struct buddy_reqs *reqs;
size_t sz;
unsigned u, l;
int cram;
unsigned u;
AN(ffd);
AN(flc);
......@@ -1194,18 +1193,12 @@ fellow_logcache_init(struct fellow_logcache *flc, struct fellow_fd *ffd,
sz = n * sizeof *fle;
u = log2up(sz);
l = log2up(sizeof *fle);
cram = ((int)l - (int)u) + 1;
assert(cram <= 0);
if (u > UINT8_MAX)
u = UINT8_MAX;
if (cram < INT8_MIN)
cram = INT8_MIN;
flc->alloc_entry = buddy_alloc1_ptr_page_wait(ffd->membuddy,
FEP_MEM_FLC, (uint8_t)u, (int8_t)cram);
FEP_MEM_FLC, (uint8_t)u, (int8_t)0);
AN(flc->alloc_entry.ptr);
sz = (size_t)1 << flc->alloc_entry.bits;
assert(sz >= sizeof *fle);
......
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