iscsi: Fix uncorrect LUN reset called when exiting connection.
This direct call of LUN reset has caused unexpected behavior during heavy stress test. Apply correct LUN reset handling for this case too. Even if there are multiple LUNs, LUN resets are serialized in the SCSI layer by previous patches and parallel calls of LUN resets will not cause any issue. Change-Id: I920e2864ef0fb41c6bd2b6153ef3caff6876e893 Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/436115 Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
parent
7d9ed0cf42
commit
308b62c6ba
@ -3296,7 +3296,7 @@ _spdk_iscsi_op_abort_task_set(void *arg)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
spdk_iscsi_op_abort_task_set(struct spdk_iscsi_task *task, uint8_t function)
|
||||
{
|
||||
task->scsi.function = function;
|
||||
|
@ -444,6 +444,8 @@ uint32_t spdk_iscsi_pdu_calc_data_digest(struct spdk_iscsi_pdu *pdu);
|
||||
void spdk_put_pdu(struct spdk_iscsi_pdu *pdu);
|
||||
struct spdk_iscsi_pdu *spdk_get_pdu(void);
|
||||
int spdk_iscsi_conn_handle_queued_datain_tasks(struct spdk_iscsi_conn *conn);
|
||||
void spdk_iscsi_op_abort_task_set(struct spdk_iscsi_task *task,
|
||||
uint8_t function);
|
||||
|
||||
static inline int
|
||||
spdk_get_immediate_data_buffer_size(void)
|
||||
|
@ -1280,9 +1280,8 @@ spdk_iscsi_tgt_node_cleanup_luns(struct spdk_iscsi_conn *conn,
|
||||
task->scsi.target_port = conn->target_port;
|
||||
task->scsi.initiator_port = conn->initiator_port;
|
||||
task->scsi.lun = lun;
|
||||
task->scsi.function = SPDK_SCSI_TASK_FUNC_LUN_RESET;
|
||||
|
||||
spdk_scsi_dev_queue_mgmt_task(target->dev, &task->scsi);
|
||||
spdk_iscsi_op_abort_task_set(task, SPDK_SCSI_TASK_FUNC_LUN_RESET);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -62,6 +62,10 @@ DEFINE_STUB(spdk_scsi_lun_get_id,
|
||||
(const struct spdk_scsi_lun *lun),
|
||||
0);
|
||||
|
||||
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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user