Lines Matching refs:ba_lun
59 static int ba_init(struct ba_lun *ba_lun) in ba_init() argument
68 __func__, ba_lun->lun_id, ba_lun->lsize, ba_lun->au_size); in ba_init()
71 lun_size_au = ba_lun->lsize / ba_lun->au_size; in ba_init()
81 __func__, ba_lun->lun_id); in ba_init()
96 "lun_id=%016llx\n", __func__, ba_lun->lun_id); in ba_init()
126 __func__, ba_lun->lun_id); in ba_init()
133 ba_lun->ba_lun_handle = bali; in ba_init()
137 __func__, ba_lun->lun_id, bali->lun_bmap_size, in ba_init()
184 static u64 ba_alloc(struct ba_lun *ba_lun) in ba_alloc() argument
190 bali = ba_lun->ba_lun_handle; in ba_alloc()
194 __func__, ba_lun->lun_id, bali->free_aun_cnt); in ba_alloc()
198 __func__, ba_lun->lun_id); in ba_alloc()
211 " lun_id=%016llx\n", __func__, ba_lun->lun_id); in ba_alloc()
224 ((bit_word * BITS_PER_LONG) + bit_pos), ba_lun->lun_id, in ba_alloc()
257 static int ba_free(struct ba_lun *ba_lun, u64 to_free) in ba_free() argument
262 bali = ba_lun->ba_lun_handle; in ba_free()
266 __func__, to_free, ba_lun->lun_id); in ba_free()
271 "free_aun_cnt=%llx\n", __func__, to_free, ba_lun->lun_id, in ba_free()
276 __func__, to_free, ba_lun->lun_id, in ba_free()
295 ba_lun->lun_id, bali->free_aun_cnt); in ba_free()
307 static int ba_clone(struct ba_lun *ba_lun, u64 to_clone) in ba_clone() argument
309 struct ba_lun_info *bali = ba_lun->ba_lun_handle; in ba_clone()
313 __func__, to_clone, ba_lun->lun_id); in ba_clone()
318 __func__, to_clone, ba_lun->lun_id); in ba_clone()
322 __func__, to_clone, ba_lun->lun_id); in ba_clone()
337 static u64 ba_space(struct ba_lun *ba_lun) in ba_space() argument
339 struct ba_lun_info *bali = ba_lun->ba_lun_handle; in ba_space()
350 void cxlflash_ba_terminate(struct ba_lun *ba_lun) in cxlflash_ba_terminate() argument
352 struct ba_lun_info *bali = ba_lun->ba_lun_handle; in cxlflash_ba_terminate()
358 ba_lun->ba_lun_handle = NULL; in cxlflash_ba_terminate()
378 blka->ba_lun.lun_id = lli->lun_index; in init_vlun()
379 blka->ba_lun.lsize = gli->max_lba + 1; in init_vlun()
380 blka->ba_lun.lba_size = gli->blk_len; in init_vlun()
382 blka->ba_lun.au_size = MC_CHUNK_SIZE; in init_vlun()
383 blka->nchunk = blka->ba_lun.lsize / MC_CHUNK_SIZE; in init_vlun()
385 rc = ba_init(&blka->ba_lun); in init_vlun()
526 av_size = ba_space(&blka->ba_lun); in grow_lxt()
568 aun = ba_alloc(&blka->ba_lun); in grow_lxt()
696 ba_free(&blka->ba_lun, aun); in shrink_lxt()
1075 cxlflash_ba_terminate(&gli->blka.ba_lun); in cxlflash_disk_virtual_open()
1132 if (ba_clone(&blka->ba_lun, aun) == -1ULL) { in clone_lxt()
1172 ba_free(&blka->ba_lun, aun); in clone_lxt()