Rename variable for clarity

while working on #60
parent 2fc3cf67
......@@ -5042,7 +5042,7 @@ struct fellow_cache_res
fellow_busy_obj_getspace(struct fellow_busy *fbo, size_t *sz, uint8_t **ptr)
{
struct fellow_cache_seg *fcs, *unbusy = NULL;
size_t max, spc, delta;
size_t chunksize, spc, delta;
struct fellow_cache_res fcr;
CHECK_OBJ_NOTNULL(fbo, FELLOW_BUSY_MAGIC);
......@@ -5056,8 +5056,8 @@ fellow_busy_obj_getspace(struct fellow_busy *fbo, size_t *sz, uint8_t **ptr)
CHECK_OBJ_NOTNULL(fbo->fc, FELLOW_CACHE_MAGIC);
CHECK_OBJ_NOTNULL(fbo->fc->tune, STVFE_TUNE_MAGIC);
max = (size_t)1 << fbo->fc->tune->chunk_exponent;
assert(max <= FIO_MAX);
chunksize = (size_t)1 << fbo->fc->tune->chunk_exponent;
assert(chunksize <= FIO_MAX);
if (fbo->sz_returned >= fbo->fc->tune->objsize_max)
return (FCR_ALLOCFAIL("objsize_max reached"));
......@@ -5118,8 +5118,8 @@ fellow_busy_obj_getspace(struct fellow_busy *fbo, size_t *sz, uint8_t **ptr)
assert_cache_seg_consistency(fcs);
spc = *sz;
if (spc > max)
spc = max;
if (spc > chunksize)
spc = chunksize;
/* we set the state of the next segment to BUSY
* before we unbusy the previous to signal to
......
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