[Zesty][SRU][Power8] ibmvscsis: Do not send aborted task response
Manoj Iyer
manoj.iyer at canonical.com
Tue Aug 1 15:49:11 UTC 2017
On Wed, Jun 21, 2017 at 2:31 AM, Stefan Bader
<stefan.bader at canonical.com> wrote:
> On 03.06.2017 00:14, Manoj Iyer wrote:
>> Please review and consider this patch series to fix IBM power8 bug
>> https://launchpad.net/bugs/1689365.
>>
>> I built a kernel with these patches and a test kernel is available
>> at
>>
>> https://launchpad.net/~ubuntu-power-triage/+archive/ubuntu/lp1689365/
>>
>> I boot tested this on Power8 system, and did not find any
>> regressions.
>> ubuntu at cameron:~$ uname -a
>> Linux cameron 4.10.0-22-generic #24~lp1689365+test.2-Ubuntu SMP Fri
>> Jun 2 18:40:56 UTC 2017 ppc64le ppc64le ppc64le GNU/Linux
>> ubuntu at cameron:~$
>>
>>
>>
> Looking at upstream 4.9.y, I see the patches to the ibmvscsis driver
> [2-4]
> applied but not the change to the genric target driver. And I am not
> seeing any
> justification why patch #1 is strictly required.
Here is the explanation from IBM and is also noted in the bug.
The reason target: Fix unknown fabric callback queue-full errors is
required is because if ibmvscsi driver returns a non -EAGAIN or -ENOMEM
error back to target-core then outgoing responses are leaked. This case
is seen in ibmvscsis_write_pending, we added code to return 0 to
address cases where if client failed or response queue is down to just
return success to LIO, since they can't do anything about it. (This is
part of ibmvscsis: Do not send aborted task response patch) But for
cases where we attempted to transfer the data and it failed and we
return a -EIO, target core would leak. Thus we need the target-core fix
to address the 2nd part of that issue.
static int ibmvscsis_write_pending(struct se_cmd *se_cmd)
{
struct ibmvscsis_cmd *cmd = container_of(se_cmd, struct ibmvscsis_cmd,
se_cmd);
struct scsi_info *vscsi = cmd->adapter;
struct iu_entry *iue = cmd->iue;
int rc;
/*
* If CLIENT_FAILED OR RESPONSE_Q_DOWN, then just return success
* since LIO can't do anything about it, and we dont want to
* attempt an srp_transfer_data.
*/
if ((vscsi->flags & (CLIENT_FAILED | RESPONSE_Q_DOWN))) {
pr_err("write_pending failed since: %d\n", vscsi->flags);
return 0;
}
rc = srp_transfer_data(cmd, &vio_iu(iue)->srp.cmd, ibmvscsis_rdma,
1, 1);
if (rc) {
pr_err("srp_transfer_data() failed: %d\n", rc);
return -EIO;
}
/*
* We now tell TCM to add this WRITE CDB directly into the TCM storage
* object execution queue.
*/
target_execute_cmd(se_cmd);
return 0;
}
>
>
> -Stefan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20170801/504e66e2/attachment.html>
More information about the kernel-team
mailing list