Skip to content

Commit

Permalink
scsi: ibmvscsis: Fix write_pending failure path
Browse files Browse the repository at this point in the history
For write_pending if the queue is down or client failed then return -EIO
so that LIO can properly process the completed command. Prior we
returned 0 since LIO could not handle it properly. Now with commit
fa7e25c ("target: Fix unknown fabric callback queue-full errors")
that patch addresses LIO's ability to handle things right.

Signed-off-by: Bryant G. Ly <bgly@us.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Bryant G. Ly authored and Martin K. Petersen committed Oct 3, 2017
1 parent 1c048a2 commit 88e6538
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
Original file line number Diff line number Diff line change
Expand Up @@ -3767,7 +3767,7 @@ static int ibmvscsis_write_pending(struct se_cmd *se_cmd)
*/
if ((vscsi->flags & (CLIENT_FAILED | RESPONSE_Q_DOWN))) {
pr_err("write_pending failed since: %d\n", vscsi->flags);
return 0;
return -EIO;
}

rc = srp_transfer_data(cmd, &vio_iu(iue)->srp.cmd, ibmvscsis_rdma,
Expand Down

0 comments on commit 88e6538

Please sign in to comment.