提交 8a955d6d 编写于 作者: N Nicholas Bellinger

target: Generate failure for XCOPY I/O with non-zero scsi_status

This patch adds the missing non-zero se_cmd->scsi_status check required
for local XCOPY I/O within target_xcopy_issue_pt_cmd() to signal an
exception case failure.

This will trigger the generation of SAM_STAT_CHECK_CONDITION status
from within target_xcopy_do_work() process context code.
Reported-by: NThomas Glanzmann <thomas@glanzmann.de>
Reported-by: NDouglas Gilbert <dgilbert@interlog.com>
Cc: Thomas Glanzmann <thomas@glanzmann.de>
Cc: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
上级 366bda19
......@@ -679,7 +679,8 @@ static int target_xcopy_issue_pt_cmd(struct xcopy_pt_cmd *xpt_cmd)
pr_debug("target_xcopy_issue_pt_cmd(): SCSI status: 0x%02x\n",
se_cmd->scsi_status);
return 0;
return (se_cmd->scsi_status) ? -EINVAL : 0;
}
static int target_xcopy_read_source(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册