Commit 1e5705ee authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Jim Harris
Browse files

scsi: Make scsi_lun_free_io_channel public



IO channel for LUN is used for hot removal as it is emphasized in the
previous patches.

In iSCSI, a SCSI device has multiple LUNs. So freeing only the IO channel
of a LUN must be possible.

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


Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
parent c645cc69
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -457,6 +457,22 @@ void spdk_scsi_task_copy_status(struct spdk_scsi_task *dst, struct spdk_scsi_tas
 */
void spdk_scsi_task_process_null_lun(struct spdk_scsi_task *task);

/**
 * Allocate I/O channel for the LUN
 *
 * \param lun Logical unit.
 *
 * \return 0 on success, -1 on failure.
 */
int spdk_scsi_lun_allocate_io_channel(struct spdk_scsi_lun *lun);

/**
 * Free I/O channel from the logical unit
 *
 * \param lun Logical unit.
 */
void spdk_scsi_lun_free_io_channel(struct spdk_scsi_lun *lun);

#ifdef __cplusplus
}
#endif
+0 −2
Original line number Diff line number Diff line
@@ -127,8 +127,6 @@ void spdk_scsi_lun_execute_task(struct spdk_scsi_lun *lun, struct spdk_scsi_task
int spdk_scsi_lun_task_mgmt_execute(struct spdk_scsi_task *task, enum spdk_scsi_task_func func);
void spdk_scsi_lun_complete_task(struct spdk_scsi_lun *lun, struct spdk_scsi_task *task);
void spdk_scsi_lun_complete_mgmt_task(struct spdk_scsi_lun *lun, struct spdk_scsi_task *task);
int spdk_scsi_lun_allocate_io_channel(struct spdk_scsi_lun *lun);
void spdk_scsi_lun_free_io_channel(struct spdk_scsi_lun *lun);
bool spdk_scsi_lun_has_pending_tasks(const struct spdk_scsi_lun *lun);

struct spdk_scsi_dev *spdk_scsi_dev_get_list(void);