All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <Bart.VanAssche@sandisk.com>
To: "bryantly@linux.vnet.ibm.com" <bryantly@linux.vnet.ibm.com>
Cc: "jejb@linux.vnet.ibm.com" <jejb@linux.vnet.ibm.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"bgly@us.ibm.com" <bgly@us.ibm.com>,
	"target-devel@vger.kernel.org" <target-devel@vger.kernel.org>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	"nab@linux-iscsi.org" <nab@linux-iscsi.org>
Subject: Re: [PATCH] ibmvscsis: Fix srp_transfer_data fail return code
Date: Tue, 10 Jan 2017 17:36:11 +0000	[thread overview]
Message-ID: <1484069756.2588.12.camel@sandisk.com> (raw)
In-Reply-To: <1483978880-93705-1-git-send-email-bryantly@linux.vnet.ibm.com>

On Mon, 2017-01-09 at 10:21 -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(-)
> 
> 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

Using the "Cc: stable@vger.kernel.org" tag is fine but please do not
add stable@vger.kernel.org to the CC-list of the e-mail header. Anyway,
thanks for the patch. It has been applied on my for-v4.10 branch.

Bart.

      parent reply	other threads:[~2017-01-10 17:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-09 16:21 [PATCH] ibmvscsis: Fix srp_transfer_data fail return code Bryant G. Ly
2017-01-09 16:47 ` Greg KH
2017-01-09 17:23   ` Bryant G. Ly
2017-01-09 17:55     ` Greg KH
2017-01-10 17:36 ` Bart Van Assche [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1484069756.2588.12.camel@sandisk.com \
    --to=bart.vanassche@sandisk.com \
    --cc=bgly@us.ibm.com \
    --cc=bryantly@linux.vnet.ibm.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=nab@linux-iscsi.org \
    --cc=target-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.