linux/drivers/target/target_core_tpg.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*******************************************************************************
 * Filename:  target_core_tpg.c
 *
 * This file contains generic Target Portal Group related functions.
 *
 * (c) Copyright 2002-2013 Datera, Inc.
 *
 * Nicholas A. Bellinger <[email protected]>
 *
 ******************************************************************************/

#include <linux/net.h>
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/in.h>
#include <linux/export.h>
#include <net/sock.h>
#include <net/tcp.h>
#include <scsi/scsi_proto.h>

#include <target/target_core_base.h>
#include <target/target_core_backend.h>
#include <target/target_core_fabric.h>

#include "target_core_internal.h"
#include "target_core_alua.h"
#include "target_core_pr.h"
#include "target_core_ua.h"

extern struct se_device *g_lun0_dev;
static DEFINE_XARRAY_ALLOC(tpg_xa);

/*	__core_tpg_get_initiator_node_acl():
 *
 *	mutex_lock(&tpg->acl_node_mutex); must be held when calling
 */
struct se_node_acl *__core_tpg_get_initiator_node_acl(
	struct se_portal_group *tpg,
	const char *initiatorname)
{}

/*	core_tpg_get_initiator_node_acl():
 *
 *
 */
struct se_node_acl *core_tpg_get_initiator_node_acl(
	struct se_portal_group *tpg,
	unsigned char *initiatorname)
{}
EXPORT_SYMBOL();

void core_allocate_nexus_loss_ua(
	struct se_node_acl *nacl)
{}
EXPORT_SYMBOL();

/*	core_tpg_add_node_to_devs():
 *
 *
 */
void core_tpg_add_node_to_devs(
	struct se_node_acl *acl,
	struct se_portal_group *tpg,
	struct se_lun *lun_orig)
{}

static void
target_set_nacl_queue_depth(struct se_portal_group *tpg,
			    struct se_node_acl *acl, u32 queue_depth)
{}

static struct se_node_acl *target_alloc_node_acl(struct se_portal_group *tpg,
		const unsigned char *initiatorname)
{}

static void target_add_node_acl(struct se_node_acl *acl)
{}

bool target_tpg_has_node_acl(struct se_portal_group *tpg,
			     const char *initiatorname)
{}
EXPORT_SYMBOL();

struct se_node_acl *core_tpg_check_initiator_node_acl(
	struct se_portal_group *tpg,
	unsigned char *initiatorname)
{}
EXPORT_SYMBOL();

void core_tpg_wait_for_nacl_pr_ref(struct se_node_acl *nacl)
{}

struct se_node_acl *core_tpg_add_initiator_node_acl(
	struct se_portal_group *tpg,
	const char *initiatorname)
{}

static void target_shutdown_sessions(struct se_node_acl *acl)
{}

void core_tpg_del_initiator_node_acl(struct se_node_acl *acl)
{}

/*	core_tpg_set_initiator_node_queue_depth():
 *
 *
 */
int core_tpg_set_initiator_node_queue_depth(
	struct se_node_acl *acl,
	u32 queue_depth)
{}
EXPORT_SYMBOL();

/*	core_tpg_set_initiator_node_tag():
 *
 *	Initiator nodeacl tags are not used internally, but may be used by
 *	userspace to emulate aliases or groups.
 *	Returns length of newly-set tag or -EINVAL.
 */
int core_tpg_set_initiator_node_tag(
	struct se_portal_group *tpg,
	struct se_node_acl *acl,
	const char *new_tag)
{}
EXPORT_SYMBOL();

static void core_tpg_lun_ref_release(struct percpu_ref *ref)
{}

static int target_tpg_register_rtpi(struct se_portal_group *se_tpg)
{}

static void target_tpg_deregister_rtpi(struct se_portal_group *se_tpg)
{}

int target_tpg_enable(struct se_portal_group *se_tpg)
{}

int target_tpg_disable(struct se_portal_group *se_tpg)
{}

/* Does not change se_wwn->priv. */
int core_tpg_register(
	struct se_wwn *se_wwn,
	struct se_portal_group *se_tpg,
	int proto_id)
{}
EXPORT_SYMBOL();

int core_tpg_deregister(struct se_portal_group *se_tpg)
{}
EXPORT_SYMBOL();

struct se_lun *core_tpg_alloc_lun(
	struct se_portal_group *tpg,
	u64 unpacked_lun)
{}

int core_tpg_add_lun(
	struct se_portal_group *tpg,
	struct se_lun *lun,
	bool lun_access_ro,
	struct se_device *dev)
{}

void core_tpg_remove_lun(
	struct se_portal_group *tpg,
	struct se_lun *lun)
{}