@@ -3851,8 +3851,9 @@ static struct se_portal_group *srpt_make_tpg(struct se_wwn *wwn,
int res;
/* Initialize sport->port_wwn and sport->port_tpg_1 */
- res = core_tpg_register(&srpt_target->tf_ops, &sport->port_wwn,
- &sport->port_tpg_1, sport, TRANSPORT_TPG_TYPE_NORMAL);
+ res = target_register_tpg(&srpt_target->tf_ops, &sport->port_wwn,
+ &sport->port_tpg_1, sport,
+ TRANSPORT_TPG_TYPE_NORMAL);
if (res)
return ERR_PTR(res);
@@ -3869,7 +3870,7 @@ static void srpt_drop_tpg(struct se_portal_group *tpg)
struct srpt_port, port_tpg_1);
sport->enabled = false;
- core_tpg_deregister(&sport->port_tpg_1);
+ target_deregister_tpg(&sport->port_tpg_1);
}
/**
@@ -1124,8 +1124,8 @@ static struct se_portal_group *tcm_qla2xxx_make_tpg(
tpg->tpg_attrib.cache_dynamic_acls = 1;
tpg->tpg_attrib.demo_mode_login_only = 1;
- ret = core_tpg_register(&tcm_qla2xxx_fabric_configfs->tf_ops, wwn,
- &tpg->se_tpg, tpg, TRANSPORT_TPG_TYPE_NORMAL);
+ ret = target_register_tpg(&tcm_qla2xxx_fabric_configfs->tf_ops, wwn,
+ &tpg->se_tpg, tpg, TRANSPORT_TPG_TYPE_NORMAL);
if (ret < 0) {
kfree(tpg);
return NULL;
@@ -1149,7 +1149,7 @@ static void tcm_qla2xxx_drop_tpg(struct se_portal_group *se_tpg)
if (vha->vha_tgt.qla_tgt && !vha->vha_tgt.qla_tgt->tgt_stop)
qlt_stop_phase1(vha->vha_tgt.qla_tgt);
- core_tpg_deregister(se_tpg);
+ target_deregister_tpg(se_tpg);
/*
* Clear local TPG=1 pointer for non NPIV mode.
*/
@@ -1244,8 +1244,8 @@ static struct se_portal_group *tcm_qla2xxx_npiv_make_tpg(
tpg->tpg_attrib.cache_dynamic_acls = 1;
tpg->tpg_attrib.demo_mode_login_only = 1;
- ret = core_tpg_register(&tcm_qla2xxx_npiv_fabric_configfs->tf_ops, wwn,
- &tpg->se_tpg, tpg, TRANSPORT_TPG_TYPE_NORMAL);
+ ret = target_register_tpg(&tcm_qla2xxx_npiv_fabric_configfs->tf_ops, wwn,
+ &tpg->se_tpg, tpg, TRANSPORT_TPG_TYPE_NORMAL);
if (ret < 0) {
kfree(tpg);
return NULL;
@@ -1449,7 +1449,7 @@ static struct se_portal_group *lio_target_tiqn_addtpg(
if (!tpg)
return NULL;
- ret = core_tpg_register(
+ ret = target_register_tpg(
&lio_target_fabric_configfs->tf_ops,
wwn, &tpg->tpg_se_tpg, tpg,
TRANSPORT_TPG_TYPE_NORMAL);
@@ -1465,7 +1465,7 @@ static struct se_portal_group *lio_target_tiqn_addtpg(
name);
return &tpg->tpg_se_tpg;
out:
- core_tpg_deregister(&tpg->tpg_se_tpg);
+ target_deregister_tpg(&tpg->tpg_se_tpg);
kfree(tpg);
return NULL;
}
@@ -68,7 +68,7 @@ int iscsit_load_discovery_tpg(void)
return -1;
}
- ret = core_tpg_register(
+ ret = target_register_tpg(
&lio_target_fabric_configfs->tf_ops,
NULL, &tpg->tpg_se_tpg, tpg,
TRANSPORT_TPG_TYPE_DISCOVERY);
@@ -107,7 +107,7 @@ int iscsit_load_discovery_tpg(void)
return 0;
out:
if (tpg->sid == 1)
- core_tpg_deregister(&tpg->tpg_se_tpg);
+ target_deregister_tpg(&tpg->tpg_se_tpg);
kfree(tpg);
return -1;
}
@@ -119,7 +119,7 @@ void iscsit_release_discovery_tpg(void)
if (!tpg)
return;
- core_tpg_deregister(&tpg->tpg_se_tpg);
+ target_deregister_tpg(&tpg->tpg_se_tpg);
kfree(tpg);
iscsit_global->discovery_tpg = NULL;
@@ -289,7 +289,7 @@ int iscsit_tpg_del_portal_group(
tpg->param_list = NULL;
}
- core_tpg_deregister(&tpg->tpg_se_tpg);
+ target_deregister_tpg(&tpg->tpg_se_tpg);
spin_lock(&tpg->tpg_state_lock);
tpg->tpg_state = TPG_STATE_FREE;
@@ -1234,9 +1234,9 @@ static struct se_portal_group *tcm_loop_make_naa_tpg(
/*
* Register the tl_tpg as a emulated SAS TCM Target Endpoint
*/
- ret = core_tpg_register(&tcm_loop_fabric_configfs->tf_ops,
- wwn, &tl_tpg->tl_se_tpg, tl_tpg,
- TRANSPORT_TPG_TYPE_NORMAL);
+ ret = target_register_tpg(&tcm_loop_fabric_configfs->tf_ops,
+ wwn, &tl_tpg->tl_se_tpg, tl_tpg,
+ TRANSPORT_TPG_TYPE_NORMAL);
if (ret < 0)
return ERR_PTR(-ENOMEM);
@@ -1265,7 +1265,7 @@ static void tcm_loop_drop_naa_tpg(
/*
* Deregister the tl_tpg as a emulated SAS TCM Target Endpoint
*/
- core_tpg_deregister(se_tpg);
+ target_deregister_tpg(se_tpg);
tl_tpg->tl_hba = NULL;
tl_tpg->tl_tpgt = 0;
@@ -2211,9 +2211,9 @@ static struct se_portal_group *sbp_make_tpg(
goto out_free_tpg;
}
- ret = core_tpg_register(&sbp_fabric_configfs->tf_ops, wwn,
- &tpg->se_tpg, (void *)tpg,
- TRANSPORT_TPG_TYPE_NORMAL);
+ ret = target_register_tpg(&sbp_fabric_configfs->tf_ops, wwn,
+ &tpg->se_tpg, (void *)tpg,
+ TRANSPORT_TPG_TYPE_NORMAL);
if (ret < 0)
goto out_unreg_mgt_agt;
@@ -2232,7 +2232,7 @@ static void sbp_drop_tpg(struct se_portal_group *se_tpg)
struct sbp_tpg *tpg = container_of(se_tpg, struct sbp_tpg, se_tpg);
struct sbp_tport *tport = tpg->tport;
- core_tpg_deregister(se_tpg);
+ target_deregister_tpg(se_tpg);
sbp_management_agent_unregister(tport->mgt_agt);
tport->tpg = NULL;
kfree(tpg);
@@ -644,7 +644,7 @@ static int core_tpg_setup_virtual_lun0(struct se_portal_group *se_tpg)
return 0;
}
-int core_tpg_register(
+int target_register_tpg(
struct target_core_fabric_ops *tfo,
struct se_wwn *se_wwn,
struct se_portal_group *se_tpg,
@@ -705,9 +705,9 @@ int core_tpg_register(
return 0;
}
-EXPORT_SYMBOL(core_tpg_register);
+EXPORT_SYMBOL(target_register_tpg);
-int core_tpg_deregister(struct se_portal_group *se_tpg)
+int target_deregister_tpg(struct se_portal_group *se_tpg)
{
struct se_node_acl *nacl, *nacl_tmp;
LIST_HEAD(node_list);
@@ -750,7 +750,7 @@ int core_tpg_deregister(struct se_portal_group *se_tpg)
array_free(se_tpg->tpg_lun_list, TRANSPORT_MAX_LUNS_PER_TPG);
return 0;
}
-EXPORT_SYMBOL(core_tpg_deregister);
+EXPORT_SYMBOL(target_deregister_tpg);
struct se_lun *core_tpg_alloc_lun(
struct se_portal_group *tpg,
@@ -337,8 +337,8 @@ static struct se_portal_group *ft_add_tpg(
return NULL;
}
- ret = core_tpg_register(&ft_configfs->tf_ops, wwn, &tpg->se_tpg,
- tpg, TRANSPORT_TPG_TYPE_NORMAL);
+ ret = target_register_tpg(&ft_configfs->tf_ops, wwn, &tpg->se_tpg,
+ tpg, TRANSPORT_TPG_TYPE_NORMAL);
if (ret < 0) {
destroy_workqueue(wq);
kfree(tpg);
@@ -374,7 +374,7 @@ static void ft_del_tpg(struct se_portal_group *se_tpg)
}
mutex_unlock(&ft_lport_lock);
- core_tpg_deregister(se_tpg);
+ target_deregister_tpg(se_tpg);
kfree(tpg);
}
@@ -1572,9 +1572,9 @@ static struct se_portal_group *usbg_make_tpg(
tpg->tport = tport;
tpg->tport_tpgt = tpgt;
- ret = core_tpg_register(&usbg_fabric_configfs->tf_ops, wwn,
- &tpg->se_tpg, tpg,
- TRANSPORT_TPG_TYPE_NORMAL);
+ ret = target_register_tpg(&usbg_fabric_configfs->tf_ops, wwn,
+ &tpg->se_tpg, tpg,
+ TRANSPORT_TPG_TYPE_NORMAL);
if (ret < 0) {
destroy_workqueue(tpg->workqueue);
kfree(tpg);
@@ -1589,7 +1589,7 @@ static void usbg_drop_tpg(struct se_portal_group *se_tpg)
struct usbg_tpg *tpg = container_of(se_tpg,
struct usbg_tpg, se_tpg);
- core_tpg_deregister(se_tpg);
+ target_deregister_tpg(se_tpg);
destroy_workqueue(tpg->workqueue);
kfree(tpg);
the_only_tpg_I_currently_have = NULL;
@@ -2155,8 +2155,8 @@ vhost_scsi_make_tpg(struct se_wwn *wwn,
tpg->tport = tport;
tpg->tport_tpgt = tpgt;
- ret = core_tpg_register(&vhost_scsi_fabric_configfs->tf_ops, wwn,
- &tpg->se_tpg, tpg, TRANSPORT_TPG_TYPE_NORMAL);
+ ret = target_register_tpg(&vhost_scsi_fabric_configfs->tf_ops, wwn,
+ &tpg->se_tpg, tpg, TRANSPORT_TPG_TYPE_NORMAL);
if (ret < 0) {
kfree(tpg);
return NULL;
@@ -2183,7 +2183,7 @@ static void vhost_scsi_drop_tpg(struct se_portal_group *se_tpg)
/*
* Deregister the se_tpg from TCM..
*/
- core_tpg_deregister(se_tpg);
+ target_deregister_tpg(se_tpg);
kfree(tpg);
}
@@ -1898,8 +1898,8 @@ scsiback_make_tpg(struct se_wwn *wwn,
tpg->tport = tport;
tpg->tport_tpgt = tpgt;
- ret = core_tpg_register(&scsiback_fabric_configfs->tf_ops, wwn,
- &tpg->se_tpg, tpg, TRANSPORT_TPG_TYPE_NORMAL);
+ ret = target_register_tpg(&scsiback_fabric_configfs->tf_ops, wwn,
+ &tpg->se_tpg, tpg, TRANSPORT_TPG_TYPE_NORMAL);
if (ret < 0) {
kfree(tpg);
return NULL;
@@ -1926,7 +1926,7 @@ static void scsiback_drop_tpg(struct se_portal_group *se_tpg)
/*
* Deregister the se_tpg from TCM..
*/
- core_tpg_deregister(se_tpg);
+ target_deregister_tpg(se_tpg);
kfree(tpg);
}
@@ -160,9 +160,9 @@ int target_set_initiator_node_queue_depth(struct se_portal_group *,
unsigned char *, u32, int);
int target_set_initiator_node_tag(struct se_portal_group *,
struct se_node_acl *, const char *);
-int core_tpg_register(struct target_core_fabric_ops *, struct se_wwn *,
+int target_register_tpg(struct target_core_fabric_ops *, struct se_wwn *,
struct se_portal_group *, void *, int);
-int core_tpg_deregister(struct se_portal_group *);
+int target_deregister_tpg(struct se_portal_group *);
/* SAS helpers */
u8 sas_get_fabric_proto_ident(struct se_portal_group *);