fellow_cache: allocate cache seglists (fcsl) by used size

parent 2122815e
......@@ -1884,7 +1884,6 @@ fellow_cache_seglists_load(const struct fellow_cache *fc,
struct buddy_off_extent next;
const char *err;
ssize_t ssz;
size_t sz;
CHECK_OBJ_NOTNULL(fc, FELLOW_CACHE_MAGIC);
......@@ -1926,10 +1925,9 @@ fellow_cache_seglists_load(const struct fellow_cache *fc,
ofcsl = fcsl;
sz = fellow_cache_seglist_size(fcsl, fdsl->lsegs);
fcsl_mem = buddy_alloc1_ptr_extent_wait(fc->membuddy, FEP_META,
sz, 0);
fellow_cache_seglist_size(fcsl, fdsl->nsegs), 0);
if (FC_INJ || fcsl_mem.ptr == NULL) {
err = FC_ERRSTR("disk seglist fcsl alloc failed");
goto err;
......
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