Lines Matching refs:max_blocks
45 static int grow(rh_info_t * info, int max_blocks) in grow() argument
52 if (max_blocks <= info->max_blocks) in grow()
55 new_blocks = max_blocks - info->max_blocks; in grow()
57 block = kmalloc_array(max_blocks, sizeof(rh_block_t), GFP_ATOMIC); in grow()
61 if (info->max_blocks > 0) { in grow()
65 sizeof(rh_block_t) * info->max_blocks); in grow()
71 blke = (unsigned long)(info->block + info->max_blocks); in grow()
73 for (i = 0, blk = block; i < info->max_blocks; i++, blk++) in grow()
87 info->max_blocks = max_blocks; in grow()
91 blk = block + info->max_blocks - new_blocks; in grow()
105 int max_blocks; in assure_empty() local
116 max_blocks = ((info->max_blocks + slots) + 15) & ~15; in assure_empty()
118 return grow(info, max_blocks); in assure_empty()
269 info->max_blocks = 0; in rh_create()
300 void rh_init(rh_info_t * info, unsigned int alignment, int max_blocks, in rh_init() argument
314 info->max_blocks = max_blocks; in rh_init()
315 info->empty_slots = max_blocks; in rh_init()
323 for (i = 0, blk = block; i < max_blocks; i++, blk++) in rh_init()
714 info, info->empty_slots, info->max_blocks); in rh_dump()