iscsi: delete spdk_iscsi_portal_grp_deletable()
This function was only useful for old (and incorrect) iSCSI topology. Hence this function can be removed. Change-Id: I1898f6a5fbffd27a55904a55cd137dafbbdf5946 Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/381241 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
d348d7e590
commit
72500a9f45
@ -804,10 +804,6 @@ spdk_rpc_delete_portal_group(struct spdk_jsonrpc_request *request,
|
||||
goto invalid;
|
||||
}
|
||||
|
||||
if (spdk_iscsi_portal_grp_deletable(req.tag)) {
|
||||
goto invalid;
|
||||
}
|
||||
|
||||
pg = spdk_iscsi_portal_grp_find_by_tag(req.tag);
|
||||
if (!pg) {
|
||||
goto invalid;
|
||||
|
@ -592,36 +592,6 @@ spdk_iscsi_portal_grp_unregister(struct spdk_iscsi_portal_grp *pg)
|
||||
pthread_mutex_unlock(&g_spdk_iscsi.mutex);
|
||||
}
|
||||
|
||||
int
|
||||
spdk_iscsi_portal_grp_deletable(int tag)
|
||||
{
|
||||
int ret = 0;
|
||||
struct spdk_iscsi_portal_grp *pg;
|
||||
|
||||
pthread_mutex_lock(&g_spdk_iscsi.mutex);
|
||||
pg = spdk_iscsi_portal_grp_find_by_tag(tag);
|
||||
if (pg == NULL) {
|
||||
ret = -1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (pg->state != GROUP_READY) {
|
||||
ret = -1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (pg->ref == 0) {
|
||||
ret = 0;
|
||||
goto out;
|
||||
}
|
||||
|
||||
out:
|
||||
if (ret == 0)
|
||||
pg->state = GROUP_DESTROY;
|
||||
pthread_mutex_unlock(&g_spdk_iscsi.mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
spdk_iscsi_portal_grp_release(struct spdk_iscsi_portal_grp *pg)
|
||||
{
|
||||
|
@ -82,6 +82,4 @@ struct spdk_iscsi_portal_grp *spdk_iscsi_portal_grp_find_by_tag(int tag);
|
||||
|
||||
int spdk_iscsi_portal_grp_open_all(void);
|
||||
int spdk_iscsi_portal_grp_close_all(void);
|
||||
|
||||
int spdk_iscsi_portal_grp_deletable(int tag);
|
||||
#endif // SPDK_PORTAL_GRP_H
|
||||
|
Loading…
Reference in New Issue
Block a user