bdev/iscsi: fix bdevperf iscsi reset
When testing iscsi reset with bdevperf, all tasks before will be canceled. And the return status will be set to CANCELED. We need to trace this status. For submit_td, sometimes, segfault is thrown because in bdev_iscsi_io_complete the iscsi_io->submit_td points to a invalid address. And assigning the submit_td in bdev_iscsi_submit_request prevent this from happening. Already tested with bdevperf and bdevio for all io types. Change-Id: Ib2bf8e2a111c4b3edb5ed88dfd2c91ed6acc5c48 Signed-off-by: Chunyang Hui <Chunyang.hui@intel.com> Reviewed-on: https://review.gerrithub.io/419932 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Ziye Yang <optimistyzy@gmail.com> Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
b36f34bd4c
commit
ee909296b4
@ -227,7 +227,7 @@ bdev_iscsi_command_cb(struct iscsi_context *context, int status, void *_task, vo
|
||||
struct scsi_task *task = _task;
|
||||
struct bdev_iscsi_io *iscsi_io = _iscsi_io;
|
||||
|
||||
iscsi_io->scsi_status = task->status;
|
||||
iscsi_io->scsi_status = status;
|
||||
iscsi_io->sk = (uint8_t)task->sense.key;
|
||||
iscsi_io->asc = (task->sense.ascq >> 8) & 0xFF;
|
||||
iscsi_io->ascq = task->sense.ascq & 0xFF;
|
||||
@ -491,6 +491,8 @@ static void bdev_iscsi_submit_request(struct spdk_io_channel *_ch, struct spdk_b
|
||||
iscsi_io->submit_td = submit_td;
|
||||
spdk_thread_send_msg(lun->master_td, _bdev_iscsi_submit_request, bdev_io);
|
||||
return;
|
||||
} else {
|
||||
iscsi_io->submit_td = NULL;
|
||||
}
|
||||
|
||||
_bdev_iscsi_submit_request(bdev_io);
|
||||
|
Loading…
Reference in New Issue
Block a user