Commit 96e930fc authored by Cunyin Chang's avatar Cunyin Chang Committed by Jim Harris
Browse files

iscsi: Fix the potential core dump issue for hotplug test case.



when test hotplug case with large write command which need r2t, after the
device hot removed, the outstanding r2t commands are waitting for data out PDU,
and the primary commands probably already return with error, then the lun
could be deleted, later the related data out PDU will received and try to send
other r2t, this patch make sure the r2t command sent smoothly even the device
hot removed.

Change-Id: I49061d1258e65cb0964526f755d870ebe7095920
Signed-off-by: default avatarCunyin Chang <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/394321


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 9a723c1a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4249,7 +4249,7 @@ spdk_iscsi_send_r2t(struct spdk_iscsi_conn *conn,
	rsp_pdu->data = NULL;
	rsph->opcode = ISCSI_OP_R2T;
	rsph->flags |= 0x80; /* bit 0 is default to 1 */
	to_be64(&rsph->lun, spdk_scsi_lun_get_id(task->scsi.lun));
	to_be64(&rsph->lun, task->lun_id);
	to_be32(&rsph->itt, task->tag);
	to_be32(&rsph->ttt, transfer_tag);