Lines Matching refs:gli
63 struct glun_info *gli = NULL; in create_global() local
65 gli = kzalloc(sizeof(*gli), GFP_KERNEL); in create_global()
66 if (unlikely(!gli)) { in create_global()
71 mutex_init(&gli->mutex); in create_global()
72 memcpy(gli->wwid, wwid, DK_CXLFLASH_MANAGE_LUN_WWID_LEN); in create_global()
74 return gli; in create_global()
103 struct glun_info *gli, *temp; in lookup_global() local
105 list_for_each_entry_safe(gli, temp, &global.gluns, list) in lookup_global()
106 if (!memcmp(gli->wwid, wwid, DK_CXLFLASH_MANAGE_LUN_WWID_LEN)) in lookup_global()
107 return gli; in lookup_global()
137 struct glun_info *gli = NULL; in find_and_create_lun() local
150 gli = lookup_global(wwid); in find_and_create_lun()
151 if (gli) { in find_and_create_lun()
152 lli->parent = gli; in find_and_create_lun()
157 gli = create_global(sdev, wwid); in find_and_create_lun()
158 if (unlikely(!gli)) { in find_and_create_lun()
164 lli->parent = gli; in find_and_create_lun()
167 list_add(&gli->list, &global.gluns); in find_and_create_lun()
170 dev_dbg(dev, "%s: returning lli=%p, gli=%p\n", __func__, lli, gli); in find_and_create_lun()
205 struct glun_info *gli, *temp; in cxlflash_term_global_luns() local
208 list_for_each_entry_safe(gli, temp, &global.gluns, list) { in cxlflash_term_global_luns()
209 list_del(&gli->list); in cxlflash_term_global_luns()
210 cxlflash_ba_terminate(&gli->blka.ba_lun); in cxlflash_term_global_luns()
211 kfree(gli); in cxlflash_term_global_luns()