Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1554461 > unrolled thread

[PATCH] ibmvscsis: Fix srp_transfer_data fail return code

Started by"Bryant G. Ly" <bryantly@linux.vnet.ibm.com>
First post2017-01-09 17:30 +0100
Last post2017-01-09 19:00 +0100
Articles 4 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] ibmvscsis: Fix srp_transfer_data fail return code "Bryant G. Ly" <bryantly@linux.vnet.ibm.com> - 2017-01-09 17:30 +0100
    Re: [PATCH] ibmvscsis: Fix srp_transfer_data fail return code Greg KH <gregkh@linuxfoundation.org> - 2017-01-09 17:50 +0100
      Re: [PATCH] ibmvscsis: Fix srp_transfer_data fail return code "Bryant G. Ly" <bryantly@linux.vnet.ibm.com> - 2017-01-09 18:30 +0100
        Re: [PATCH] ibmvscsis: Fix srp_transfer_data fail return code Greg KH <gregkh@linuxfoundation.org> - 2017-01-09 19:00 +0100

#1554461 — [PATCH] ibmvscsis: Fix srp_transfer_data fail return code

From"Bryant G. Ly" <bryantly@linux.vnet.ibm.com>
Date2017-01-09 17:30 +0100
Subject[PATCH] ibmvscsis: Fix srp_transfer_data fail return code
Message-ID<sXKZA-6rv-15@gated-at.bofh.it>
From: "Bryant G. Ly" <bgly@us.ibm.com>

If srp_transfer_data fails within ibmvscsis_write_pending, then
the most likely scenario is that the client timed out the op and
removed the TCE mapping. Thus it will loop forever retrying the
op that is pretty much guaranteed to fail forever. A better return
code would be EIO instead of EAGAIN.

Cc: stable@vger.kernel.org
Reported-by: Steven Royer <seroyer@linux.vnet.ibm.com>
Tested-by: Steven Royer <seroyer@linux.vnet.ibm.com>
Signed-off-by: Bryant G. Ly <bgly@us.ibm.com>
---
 drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
index 3d3768a..8fb5c54 100644
--- a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
+++ b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
@@ -3585,7 +3585,7 @@ static int ibmvscsis_write_pending(struct se_cmd *se_cmd)
 			       1, 1);
 	if (rc) {
 		pr_err("srp_transfer_data() failed: %d\n", rc);
-		return -EAGAIN;
+		return -EIO;
 	}
 	/*
 	 * We now tell TCM to add this WRITE CDB directly into the TCM storage
-- 
2.5.4 (Apple Git-61)

[toc] | [next] | [standalone]


#1554487

FromGreg KH <gregkh@linuxfoundation.org>
Date2017-01-09 17:50 +0100
Message-ID<sXLiW-6zl-35@gated-at.bofh.it>
In reply to#1554461
On Mon, Jan 09, 2017 at 10:21:20AM -0600, Bryant G. Ly wrote:
> From: "Bryant G. Ly" <bgly@us.ibm.com>
> 
> If srp_transfer_data fails within ibmvscsis_write_pending, then
> the most likely scenario is that the client timed out the op and
> removed the TCE mapping. Thus it will loop forever retrying the
> op that is pretty much guaranteed to fail forever. A better return
> code would be EIO instead of EAGAIN.
> 
> Cc: stable@vger.kernel.org
> Reported-by: Steven Royer <seroyer@linux.vnet.ibm.com>
> Tested-by: Steven Royer <seroyer@linux.vnet.ibm.com>
> Signed-off-by: Bryant G. Ly <bgly@us.ibm.com>
> ---
>  drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Why are you sending this to me?

confused,

greg k-h

[toc] | [prev] | [next] | [standalone]


#1554521

From"Bryant G. Ly" <bryantly@linux.vnet.ibm.com>
Date2017-01-09 18:30 +0100
Message-ID<sXLVE-74k-21@gated-at.bofh.it>
In reply to#1554487
On 1/9/17 10:47 AM, Greg KH wrote:

> On Mon, Jan 09, 2017 at 10:21:20AM -0600, Bryant G. Ly wrote:
>> From: "Bryant G. Ly" <bgly@us.ibm.com>
>>
>> If srp_transfer_data fails within ibmvscsis_write_pending, then
>> the most likely scenario is that the client timed out the op and
>> removed the TCE mapping. Thus it will loop forever retrying the
>> op that is pretty much guaranteed to fail forever. A better return
>> code would be EIO instead of EAGAIN.
>>
>> Cc: stable@vger.kernel.org
>> Reported-by: Steven Royer <seroyer@linux.vnet.ibm.com>
>> Tested-by: Steven Royer <seroyer@linux.vnet.ibm.com>
>> Signed-off-by: Bryant G. Ly <bgly@us.ibm.com>
>> ---
>>   drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
> Why are you sending this to me?
>
> confused,
>
> greg k-h
Sorry I meant to put --to target-devel@vger.kernel.org, and just --cc you.

-Bryant

[toc] | [prev] | [next] | [standalone]


#1554559

FromGreg KH <gregkh@linuxfoundation.org>
Date2017-01-09 19:00 +0100
Message-ID<sXMoG-7ef-31@gated-at.bofh.it>
In reply to#1554521
On Mon, Jan 09, 2017 at 11:23:23AM -0600, Bryant G. Ly wrote:
> On 1/9/17 10:47 AM, Greg KH wrote:
> 
> > On Mon, Jan 09, 2017 at 10:21:20AM -0600, Bryant G. Ly wrote:
> > > From: "Bryant G. Ly" <bgly@us.ibm.com>
> > > 
> > > If srp_transfer_data fails within ibmvscsis_write_pending, then
> > > the most likely scenario is that the client timed out the op and
> > > removed the TCE mapping. Thus it will loop forever retrying the
> > > op that is pretty much guaranteed to fail forever. A better return
> > > code would be EIO instead of EAGAIN.
> > > 
> > > Cc: stable@vger.kernel.org
> > > Reported-by: Steven Royer <seroyer@linux.vnet.ibm.com>
> > > Tested-by: Steven Royer <seroyer@linux.vnet.ibm.com>
> > > Signed-off-by: Bryant G. Ly <bgly@us.ibm.com>
> > > ---
> > >   drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > Why are you sending this to me?
> > 
> > confused,
> > 
> > greg k-h
> Sorry I meant to put --to target-devel@vger.kernel.org, and just --cc you.

Why even cc: me?

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web