diff options
author | Bryant G. Ly <bgly@us.ibm.com> | 2017-10-02 13:59:38 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-10-02 22:49:27 -0400 |
commit | 88e65389fce1f68ba6d13ae2fc0f8d7e5c338c52 (patch) | |
tree | e0d160162aa1b2d916e9047311871d96d350c70f | |
parent | 1c048a250aae1aaab0ba9dbec908f0c6cdb8614f (diff) |
scsi: ibmvscsis: Fix write_pending failure path
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
fa7e25cf13a6 ("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>
-rw-r--r-- | drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c index 785fb42f6650..2799a6b08f73 100644 --- a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c +++ b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | |||
@@ -3767,7 +3767,7 @@ static int ibmvscsis_write_pending(struct se_cmd *se_cmd) | |||
3767 | */ | 3767 | */ |
3768 | if ((vscsi->flags & (CLIENT_FAILED | RESPONSE_Q_DOWN))) { | 3768 | if ((vscsi->flags & (CLIENT_FAILED | RESPONSE_Q_DOWN))) { |
3769 | pr_err("write_pending failed since: %d\n", vscsi->flags); | 3769 | pr_err("write_pending failed since: %d\n", vscsi->flags); |
3770 | return 0; | 3770 | return -EIO; |
3771 | } | 3771 | } |
3772 | 3772 | ||
3773 | rc = srp_transfer_data(cmd, &vio_iu(iue)->srp.cmd, ibmvscsis_rdma, | 3773 | rc = srp_transfer_data(cmd, &vio_iu(iue)->srp.cmd, ibmvscsis_rdma, |