Commit 69bef7f7 authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Jim Harris
Browse files

ut/iscsi: Use STUB in iSCSI unit tests



Change-Id: I815ac69b6468ab910da789c6980c27ebd14846da
Signed-off-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/436646


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 760c8def
Loading
Loading
Loading
Loading
+35 −92
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@
#include "spdk_cunit.h"

#include "spdk_internal/log.h"
#include "spdk_internal/mock.h"

#include "scsi/scsi_internal.h"

@@ -74,33 +75,18 @@ spdk_get_pdu(void)
	return pdu;
}

void
spdk_scsi_task_process_null_lun(struct spdk_scsi_task *task)
{
}
DEFINE_STUB_V(spdk_scsi_task_process_null_lun, (struct spdk_scsi_task *task));

void
spdk_scsi_task_process_abort(struct spdk_scsi_task *task)
{
}
DEFINE_STUB_V(spdk_scsi_task_process_abort, (struct spdk_scsi_task *task));

void
spdk_scsi_dev_queue_task(struct spdk_scsi_dev *dev,
			 struct spdk_scsi_task *task)
{
}
DEFINE_STUB_V(spdk_scsi_dev_queue_task,
	      (struct spdk_scsi_dev *dev, struct spdk_scsi_task *task));

struct spdk_scsi_port *
spdk_scsi_dev_find_port_by_id(struct spdk_scsi_dev *dev, uint64_t id)
{
	return NULL;
}
DEFINE_STUB(spdk_scsi_dev_find_port_by_id, struct spdk_scsi_port *,
	    (struct spdk_scsi_dev *dev, uint64_t id), NULL);

void
spdk_scsi_dev_queue_mgmt_task(struct spdk_scsi_dev *dev,
			      struct spdk_scsi_task *task)
{
}
DEFINE_STUB_V(spdk_scsi_dev_queue_mgmt_task,
	      (struct spdk_scsi_dev *dev, struct spdk_scsi_task *task));

const char *
spdk_scsi_dev_get_name(const struct spdk_scsi_dev *dev)
@@ -112,15 +98,9 @@ spdk_scsi_dev_get_name(const struct spdk_scsi_dev *dev)
	return NULL;
}

void
spdk_iscsi_acceptor_start(struct spdk_iscsi_portal *p)
{
}
DEFINE_STUB_V(spdk_iscsi_acceptor_start, (struct spdk_iscsi_portal *p));

void
spdk_iscsi_acceptor_stop(struct spdk_iscsi_portal *p)
{
}
DEFINE_STUB_V(spdk_iscsi_acceptor_stop, (struct spdk_iscsi_portal *p));

struct spdk_sock *
spdk_sock_listen(const char *ip, int port)
@@ -169,55 +149,31 @@ spdk_app_parse_core_mask(const char *mask, struct spdk_cpuset *cpumask)
	return 0;
}

uint32_t
spdk_env_get_current_core(void)
{
	return 0;
}
DEFINE_STUB(spdk_env_get_current_core, uint32_t, (void), 0);

struct spdk_event *
spdk_event_allocate(uint32_t core, spdk_event_fn fn, void *arg1, void *arg2)
{
	return NULL;
}
DEFINE_STUB(spdk_event_allocate, struct spdk_event *,
	    (uint32_t core, spdk_event_fn fn, void *arg1, void *arg2), NULL);

struct spdk_scsi_dev *
	spdk_scsi_dev_construct(const char *name, const char **bdev_name_list,
DEFINE_STUB(spdk_scsi_dev_construct, struct spdk_scsi_dev *,
	    (const char *name, const char **bdev_name_list,
	     int *lun_id_list, int num_luns, uint8_t protocol_id,
	     void (*hotremove_cb)(const struct spdk_scsi_lun *, void *),
			void *hotremove_ctx)
{
	return NULL;
}
	     void *hotremove_ctx),
	    NULL);

void
spdk_scsi_dev_destruct(struct spdk_scsi_dev *dev)
{
}
DEFINE_STUB_V(spdk_scsi_dev_destruct, (struct spdk_scsi_dev *dev));

int
spdk_scsi_dev_add_port(struct spdk_scsi_dev *dev, uint64_t id, const char *name)
{
	return 0;
}
DEFINE_STUB(spdk_scsi_dev_add_port, int,
	    (struct spdk_scsi_dev *dev, uint64_t id, const char *name), 0);

int
spdk_iscsi_drop_conns(struct spdk_iscsi_conn *conn, const char *conn_match,
		      int drop_all)
{
	return 0;
}
DEFINE_STUB(spdk_iscsi_drop_conns, int,
	    (struct spdk_iscsi_conn *conn, const char *conn_match, int drop_all),
	    0);

int
spdk_scsi_dev_delete_port(struct spdk_scsi_dev *dev, uint64_t id)
{
	return 0;
}
DEFINE_STUB(spdk_scsi_dev_delete_port, int,
	    (struct spdk_scsi_dev *dev, uint64_t id), 0);

void
spdk_shutdown_iscsi_conns(void)
{
}
DEFINE_STUB_V(spdk_shutdown_iscsi_conns, (void));

void
spdk_iscsi_task_cpl(struct spdk_scsi_task *scsi_task)
@@ -230,18 +186,10 @@ spdk_iscsi_task_cpl(struct spdk_scsi_task *scsi_task)
	}
}

void
spdk_iscsi_task_mgmt_cpl(struct spdk_scsi_task *scsi_task)
{
DEFINE_STUB_V(spdk_iscsi_task_mgmt_cpl, (struct spdk_scsi_task *scsi_task));

}

int
spdk_iscsi_conn_read_data(struct spdk_iscsi_conn *conn, int bytes,
			  void *buf)
{
	return 0;
}
DEFINE_STUB(spdk_iscsi_conn_read_data, int,
	    (struct spdk_iscsi_conn *conn, int bytes, void *buf), 0);

void
spdk_iscsi_conn_write_pdu(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
@@ -249,15 +197,10 @@ spdk_iscsi_conn_write_pdu(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *p
	TAILQ_INSERT_TAIL(&g_write_pdu_list, pdu, tailq);
}

void
spdk_iscsi_conn_logout(struct spdk_iscsi_conn *conn)
{
}
DEFINE_STUB_V(spdk_iscsi_conn_logout, (struct spdk_iscsi_conn *conn));

void
spdk_scsi_task_set_status(struct spdk_scsi_task *task, int sc, int sk, int asc, int ascq)
{
}
DEFINE_STUB_V(spdk_scsi_task_set_status,
	      (struct spdk_scsi_task *task, int sc, int sk, int asc, int ascq));

void
spdk_scsi_task_set_data(struct spdk_scsi_task *task, void *data, uint32_t len)
+80 −202
Original line number Diff line number Diff line
@@ -38,6 +38,8 @@

#include "iscsi/conn.c"

#include "spdk_internal/mock.h"

SPDK_LOG_REGISTER_COMPONENT("iscsi", SPDK_LOG_ISCSI)

#define DMIN32(A,B) ((uint32_t) ((uint32_t)(A) > (uint32_t)(B) ? (uint32_t)(B) : (uint32_t)(A)))
@@ -45,53 +47,26 @@ SPDK_LOG_REGISTER_COMPONENT("iscsi", SPDK_LOG_ISCSI)
struct spdk_iscsi_globals g_spdk_iscsi;
static TAILQ_HEAD(, spdk_iscsi_task) g_ut_read_tasks = TAILQ_HEAD_INITIALIZER(g_ut_read_tasks);

int
spdk_app_get_shm_id(void)
{
	return 0;
}
DEFINE_STUB(spdk_app_get_shm_id, int, (void), 0);

uint32_t
spdk_env_get_current_core(void)
{
	return 0;
}
DEFINE_STUB(spdk_env_get_current_core, uint32_t, (void), 0);

uint32_t
spdk_env_get_first_core(void)
{
	return 0;
}
DEFINE_STUB(spdk_env_get_first_core, uint32_t, (void), 0);

uint32_t
spdk_env_get_last_core(void)
{
	return 0;
}
DEFINE_STUB(spdk_env_get_last_core, uint32_t, (void), 0);

uint32_t
spdk_env_get_next_core(uint32_t prev_core)
{
	return 0;
}
DEFINE_STUB(spdk_env_get_next_core, uint32_t, (uint32_t prev_core), 0);

struct spdk_event *
spdk_event_allocate(uint32_t lcore, spdk_event_fn fn, void *arg1, void *arg2)
{
	return NULL;
}
DEFINE_STUB(spdk_event_allocate, struct spdk_event *,
	    (uint32_t lcore, spdk_event_fn fn, void *arg1, void *arg2),
	    NULL);

void
spdk_event_call(struct spdk_event *event)
{
}
DEFINE_STUB_V(spdk_event_call, (struct spdk_event *event));

int
spdk_sock_getaddr(struct spdk_sock *sock, char *saddr, int slen, uint16_t *sport,
		  char *caddr, int clen, uint16_t *cport)
{
	return 0;
}
DEFINE_STUB(spdk_sock_getaddr, int,
	    (struct spdk_sock *sock, char *saddr, int slen, uint16_t *sport,
	     char *caddr, int clen, uint16_t *cport),
	    0);

int
spdk_sock_close(struct spdk_sock **sock)
@@ -100,202 +75,105 @@ spdk_sock_close(struct spdk_sock **sock)
	return 0;
}

ssize_t
spdk_sock_recv(struct spdk_sock *sock, void *buf, size_t len)
{
	return 0;
}
DEFINE_STUB(spdk_sock_recv, ssize_t,
	    (struct spdk_sock *sock, void *buf, size_t len), 0);

ssize_t
spdk_sock_writev(struct spdk_sock *sock, struct iovec *iov, int iovcnt)
{
	return 0;
}
DEFINE_STUB(spdk_sock_writev, ssize_t,
	    (struct spdk_sock *sock, struct iovec *iov, int iovcnt), 0);

int
spdk_sock_set_recvlowat(struct spdk_sock *s, int nbytes)
{
	return 0;
}
DEFINE_STUB(spdk_sock_set_recvlowat, int, (struct spdk_sock *s, int nbytes), 0);

int
spdk_sock_set_recvbuf(struct spdk_sock *sock, int sz)
{
	return 0;
}
DEFINE_STUB(spdk_sock_set_recvbuf, int, (struct spdk_sock *sock, int sz), 0);

int
spdk_sock_set_sendbuf(struct spdk_sock *sock, int sz)
{
	return 0;
}
DEFINE_STUB(spdk_sock_set_sendbuf, int, (struct spdk_sock *sock, int sz), 0);

int
spdk_sock_group_add_sock(struct spdk_sock_group *group, struct spdk_sock *sock,
			 spdk_sock_cb cb_fn, void *cb_arg)
{
	return 0;
}
DEFINE_STUB(spdk_sock_group_add_sock, int,
	    (struct spdk_sock_group *group, struct spdk_sock *sock,
	     spdk_sock_cb cb_fn, void *cb_arg),
	    0);

int
spdk_sock_group_remove_sock(struct spdk_sock_group *group, struct spdk_sock *sock)
{
	return 0;
}
DEFINE_STUB(spdk_sock_group_remove_sock, int,
	    (struct spdk_sock_group *group, struct spdk_sock *sock), 0);

void
spdk_scsi_task_put(struct spdk_scsi_task *task)
{
}
DEFINE_STUB_V(spdk_scsi_task_put, (struct spdk_scsi_task *task));

struct spdk_scsi_lun *
spdk_scsi_dev_get_lun(struct spdk_scsi_dev *dev, int lun_id)
{
	return NULL;
}
DEFINE_STUB(spdk_scsi_dev_get_lun, struct spdk_scsi_lun *,
	    (struct spdk_scsi_dev *dev, int lun_id), NULL);

bool
spdk_scsi_dev_has_pending_tasks(const struct spdk_scsi_dev *dev)
{
	return true;
}
DEFINE_STUB(spdk_scsi_dev_has_pending_tasks, bool,
	    (const struct spdk_scsi_dev *dev), true);

int
spdk_scsi_lun_open(struct spdk_scsi_lun *lun, spdk_scsi_remove_cb_t hotremove_cb,
		   void *hotremove_ctx, struct spdk_scsi_desc **desc)
{
	return 0;
}
DEFINE_STUB(spdk_scsi_lun_open, int,
	    (struct spdk_scsi_lun *lun, spdk_scsi_remove_cb_t hotremove_cb,
	     void *hotremove_ctx, struct spdk_scsi_desc **desc),
	    0);

void
spdk_scsi_lun_close(struct spdk_scsi_desc *desc)
{
}
DEFINE_STUB_V(spdk_scsi_lun_close, (struct spdk_scsi_desc *desc));

int spdk_scsi_lun_allocate_io_channel(struct spdk_scsi_desc *desc)
{
	return 0;
}
DEFINE_STUB(spdk_scsi_lun_allocate_io_channel, int,
	    (struct spdk_scsi_desc *desc), 0);

void spdk_scsi_lun_free_io_channel(struct spdk_scsi_desc *desc)
{
}
DEFINE_STUB_V(spdk_scsi_lun_free_io_channel, (struct spdk_scsi_desc *desc));

int
spdk_scsi_lun_get_id(const struct spdk_scsi_lun *lun)
{
	return 0;
}
DEFINE_STUB(spdk_scsi_lun_get_id, int, (const struct spdk_scsi_lun *lun), 0);

const char *
spdk_scsi_port_get_name(const struct spdk_scsi_port *port)
{
	return NULL;
}
DEFINE_STUB(spdk_scsi_port_get_name, const char *,
	    (const struct spdk_scsi_port *port), NULL);

void
spdk_scsi_task_copy_status(struct spdk_scsi_task *dst,
			   struct spdk_scsi_task *src)
{
}
DEFINE_STUB_V(spdk_scsi_task_copy_status,
	      (struct spdk_scsi_task *dst, struct spdk_scsi_task *src));

void
spdk_put_pdu(struct spdk_iscsi_pdu *pdu)
{
}
DEFINE_STUB_V(spdk_put_pdu, (struct spdk_iscsi_pdu *pdu));

void
spdk_iscsi_param_free(struct iscsi_param *params)
{
}
DEFINE_STUB_V(spdk_iscsi_param_free, (struct iscsi_param *params));

int
spdk_iscsi_conn_params_init(struct iscsi_param **params)
{
	return 0;
}
DEFINE_STUB(spdk_iscsi_conn_params_init, int, (struct iscsi_param **params), 0);

void spdk_clear_all_transfer_task(struct spdk_iscsi_conn *conn,
				  struct spdk_scsi_lun *lun,
				  struct spdk_iscsi_pdu *pdu)
{
}
DEFINE_STUB_V(spdk_clear_all_transfer_task,
	      (struct spdk_iscsi_conn *conn, struct spdk_scsi_lun *lun,
	       struct spdk_iscsi_pdu *pdu));

int
spdk_iscsi_build_iovecs(struct spdk_iscsi_conn *conn, struct iovec *iovec,
			struct spdk_iscsi_pdu *pdu)
{
	return 0;
}
DEFINE_STUB(spdk_iscsi_build_iovecs, int,
	    (struct spdk_iscsi_conn *conn, struct iovec *iovec,
	     struct spdk_iscsi_pdu *pdu),
	    0);

bool spdk_iscsi_is_deferred_free_pdu(struct spdk_iscsi_pdu *pdu)
{
	return false;
}
DEFINE_STUB(spdk_iscsi_is_deferred_free_pdu, bool,
	    (struct spdk_iscsi_pdu *pdu), false);

void spdk_iscsi_task_response(struct spdk_iscsi_conn *conn,
			      struct spdk_iscsi_task *task)
{
}
DEFINE_STUB_V(spdk_iscsi_task_response,
	      (struct spdk_iscsi_conn *conn, struct spdk_iscsi_task *task));

void
spdk_iscsi_task_mgmt_response(struct spdk_iscsi_conn *conn,
			      struct spdk_iscsi_task *task)
{
}
DEFINE_STUB_V(spdk_iscsi_task_mgmt_response,
	      (struct spdk_iscsi_conn *conn, struct spdk_iscsi_task *task));

void spdk_iscsi_send_nopin(struct spdk_iscsi_conn *conn)
{
}
DEFINE_STUB_V(spdk_iscsi_send_nopin, (struct spdk_iscsi_conn *conn));

int
spdk_iscsi_execute(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
{
	return 0;
}
DEFINE_STUB(spdk_iscsi_execute, int,
	    (struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu), 0);

void spdk_del_transfer_task(struct spdk_iscsi_conn *conn, uint32_t task_tag)
{
}
DEFINE_STUB_V(spdk_del_transfer_task,
	      (struct spdk_iscsi_conn *conn, uint32_t task_tag));

int spdk_iscsi_conn_handle_queued_datain_tasks(struct spdk_iscsi_conn *conn)
{
	return 0;
}
DEFINE_STUB(spdk_iscsi_conn_handle_queued_datain_tasks, int,
	    (struct spdk_iscsi_conn *conn), 0);

int
spdk_iscsi_read_pdu(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu **_pdu)
{
	return 0;
}
DEFINE_STUB(spdk_iscsi_read_pdu, int,
	    (struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu **_pdu), 0);

void spdk_free_sess(struct spdk_iscsi_sess *sess)
{
}
DEFINE_STUB_V(spdk_free_sess, (struct spdk_iscsi_sess *sess));

int
spdk_iscsi_tgt_node_cleanup_luns(struct spdk_iscsi_conn *conn,
				 struct spdk_iscsi_tgt_node *target)
{
	return 0;
}
DEFINE_STUB(spdk_iscsi_tgt_node_cleanup_luns, int,
	    (struct spdk_iscsi_conn *conn, struct spdk_iscsi_tgt_node *target),
	    0);

uint32_t
spdk_iscsi_pdu_calc_header_digest(struct spdk_iscsi_pdu *pdu)
{
	return 0;
}
DEFINE_STUB(spdk_iscsi_pdu_calc_header_digest, uint32_t,
	    (struct spdk_iscsi_pdu *pdu), 0);

uint32_t
spdk_iscsi_pdu_calc_data_digest(struct spdk_iscsi_pdu *pdu)
{
	return 0;
}
DEFINE_STUB(spdk_iscsi_pdu_calc_data_digest, uint32_t,
	    (struct spdk_iscsi_pdu *pdu), 0);

void
spdk_shutdown_iscsi_conns_done(void)
{
}
DEFINE_STUB_V(spdk_shutdown_iscsi_conns_done, (void));

static struct spdk_iscsi_task *
ut_conn_task_get(struct spdk_iscsi_task *parent)
+15 −30
Original line number Diff line number Diff line
@@ -47,6 +47,8 @@
#include "scsi/scsi_internal.h"
#include "common/lib/test_env.c"

#include "spdk_internal/mock.h"

#define UT_TARGET_NAME1		"iqn.2017-11.spdk.io:t0001"
#define UT_TARGET_NAME2		"iqn.2017-11.spdk.io:t0002"
#define UT_INITIATOR_NAME1	"iqn.2017-11.spdk.io:i0001"
@@ -74,35 +76,21 @@ spdk_iscsi_tgt_node_access(struct spdk_iscsi_conn *conn,
	}
}

int
spdk_iscsi_send_tgts(struct spdk_iscsi_conn *conn, const char *iiqn,
		     const char *iaddr,
		     const char *tiqn, uint8_t *data, int alloc_len, int data_len)
{
	return 0;
}
DEFINE_STUB(spdk_iscsi_send_tgts, int,
	    (struct spdk_iscsi_conn *conn, const char *iiqn, const char *iaddr,
	     const char *tiqn, uint8_t *data, int alloc_len, int data_len),
	    0);

void
spdk_iscsi_portal_grp_close_all(void)
{
}
DEFINE_STUB_V(spdk_iscsi_portal_grp_close_all, (void));

void
spdk_iscsi_conn_migration(struct spdk_iscsi_conn *conn)
{
}
DEFINE_STUB_V(spdk_iscsi_conn_migration, (struct spdk_iscsi_conn *conn));

void
spdk_iscsi_conn_free_pdu(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
{
}
DEFINE_STUB_V(spdk_iscsi_conn_free_pdu,
	      (struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu));

int
spdk_iscsi_chap_get_authinfo(struct iscsi_chap_auth *auth, const char *authuser,
			     int ag_tag)
{
	return 0;
}
DEFINE_STUB(spdk_iscsi_chap_get_authinfo, int,
	    (struct iscsi_chap_auth *auth, const char *authuser, int ag_tag),
	    0);

int
spdk_scsi_lun_get_id(const struct spdk_scsi_lun *lun)
@@ -110,11 +98,8 @@ spdk_scsi_lun_get_id(const struct spdk_scsi_lun *lun)
	return lun->id;
}

bool
spdk_scsi_lun_is_removing(const struct spdk_scsi_lun *lun)
{
	return true;
}
DEFINE_STUB(spdk_scsi_lun_is_removing, bool, (const struct spdk_scsi_lun *lun),
	    true);

struct spdk_scsi_lun *
spdk_scsi_dev_get_lun(struct spdk_scsi_dev *dev, int lun_id)
+12 −19
Original line number Diff line number Diff line
@@ -40,29 +40,22 @@
#include "../common.c"
#include "iscsi/param.c"

#include "spdk_internal/mock.h"

struct spdk_iscsi_globals g_spdk_iscsi;

struct spdk_iscsi_tgt_node *
spdk_iscsi_find_tgt_node(const char *target_name)
{
	return NULL;
}
DEFINE_STUB(spdk_iscsi_find_tgt_node, struct spdk_iscsi_tgt_node *,
	    (const char *target_name), NULL);

bool
spdk_iscsi_tgt_node_access(struct spdk_iscsi_conn *conn,
			   struct spdk_iscsi_tgt_node *target,
			   const char *iqn, const char *addr)
{
	return false;
}
DEFINE_STUB(spdk_iscsi_tgt_node_access, bool,
	    (struct spdk_iscsi_conn *conn, struct spdk_iscsi_tgt_node *target,
	     const char *iqn, const char *addr),
	    false);

int
spdk_iscsi_send_tgts(struct spdk_iscsi_conn *conn, const char *iiqn,
		     const char *iaddr,
		     const char *tiqn, uint8_t *data, int alloc_len, int data_len)
{
	return 0;
}
DEFINE_STUB(spdk_iscsi_send_tgts, int,
	    (struct spdk_iscsi_conn *conn, const char *iiqn, const char *iaddr,
	     const char *tiqn, uint8_t *data, int alloc_len, int data_len),
	    0);

static void
burst_length_param_negotation(int FirstBurstLength, int MaxBurstLength,
+6 −20
Original line number Diff line number Diff line
@@ -66,29 +66,15 @@ DEFINE_STUB_V(spdk_iscsi_op_abort_task_set,
	      (struct spdk_iscsi_task *task,
	       uint8_t function));

bool
spdk_sock_is_ipv6(struct spdk_sock *sock)
{
	return false;
}
DEFINE_STUB(spdk_sock_is_ipv6, bool, (struct spdk_sock *sock), false);

bool
spdk_sock_is_ipv4(struct spdk_sock *sock)
{
	return false;
}
DEFINE_STUB(spdk_sock_is_ipv4, bool, (struct spdk_sock *sock), false);

struct spdk_iscsi_portal_grp *
spdk_iscsi_portal_grp_find_by_tag(int tag)
{
	return NULL;
}
DEFINE_STUB(spdk_iscsi_portal_grp_find_by_tag,
	    struct spdk_iscsi_portal_grp *, (int tag), NULL);

struct spdk_iscsi_init_grp *
spdk_iscsi_init_grp_find_by_tag(int tag)
{
	return NULL;
}
DEFINE_STUB(spdk_iscsi_init_grp_find_by_tag, struct spdk_iscsi_init_grp *,
	    (int tag), NULL);

struct spdk_scsi_lun *
spdk_scsi_dev_get_lun(struct spdk_scsi_dev *dev, int lun_id)