Lines Matching refs:tf

112 	struct target_fabric_configfs *tf;  in target_core_get_fabric()  local
118 list_for_each_entry(tf, &g_tf_list, tf_list) { in target_core_get_fabric()
119 if (!strcmp(tf->tf_name, name)) { in target_core_get_fabric()
120 atomic_inc(&tf->tf_access_cnt); in target_core_get_fabric()
122 return tf; in target_core_get_fabric()
137 struct target_fabric_configfs *tf; in target_core_register_fabric() local
143 tf = target_core_get_fabric(name); in target_core_register_fabric()
144 if (!tf) { in target_core_register_fabric()
187 tf = target_core_get_fabric(name); in target_core_register_fabric()
190 if (!tf) { in target_core_register_fabric()
196 " %s\n", tf->tf_name); in target_core_register_fabric()
202 &tf->tf_cit_tmpl.tfc_wwn_cit); in target_core_register_fabric()
204 tf->tf_group.default_groups = tf->tf_default_groups; in target_core_register_fabric()
205 tf->tf_group.default_groups[0] = &tf->tf_disc_group; in target_core_register_fabric()
206 tf->tf_group.default_groups[1] = NULL; in target_core_register_fabric()
208 config_group_init_type_name(&tf->tf_group, name, in target_core_register_fabric()
209 &tf->tf_cit_tmpl.tfc_wwn_cit); in target_core_register_fabric()
210 config_group_init_type_name(&tf->tf_disc_group, "discovery_auth", in target_core_register_fabric()
211 &tf->tf_cit_tmpl.tfc_discovery_cit); in target_core_register_fabric()
214 " %s\n", tf->tf_group.cg_item.ci_name); in target_core_register_fabric()
215 tf->tf_fabric = &tf->tf_group.cg_item; in target_core_register_fabric()
219 return &tf->tf_group; in target_core_register_fabric()
229 struct target_fabric_configfs *tf = container_of( in target_core_deregister_fabric() local
239 " %s\n", tf->tf_name); in target_core_deregister_fabric()
240 atomic_dec(&tf->tf_access_cnt); in target_core_deregister_fabric()
243 " tf->tf_fabric for %s\n", tf->tf_name); in target_core_deregister_fabric()
244 tf->tf_fabric = NULL; in target_core_deregister_fabric()
249 tf_group = &tf->tf_group; in target_core_deregister_fabric()
452 struct target_fabric_configfs *tf; in target_register_template() local
459 tf = kzalloc(sizeof(struct target_fabric_configfs), GFP_KERNEL); in target_register_template()
460 if (!tf) { in target_register_template()
465 INIT_LIST_HEAD(&tf->tf_list); in target_register_template()
466 atomic_set(&tf->tf_access_cnt, 0); in target_register_template()
472 tf->tf_module = fo->module; in target_register_template()
473 snprintf(tf->tf_name, TARGET_FABRIC_NAME_SIZE, "%s", fo->name); in target_register_template()
475 tf->tf_ops = *fo; in target_register_template()
476 target_fabric_setup_cits(tf); in target_register_template()
479 list_add_tail(&tf->tf_list, &g_tf_list); in target_register_template()