linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Bin Wu <wu.wubin@huawei.com>,
	boris.ostrovsky@oracle.com, david.vrabel@citrix.com,
	jejb@linux.vnet.ibm.com, martin.petersen@oracle.com,
	xen-devel@lists.xenproject.org, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] xen_pvscsi: reclaim the ring request when the prepairing failed
Date: Tue, 12 Jul 2016 10:02:23 +0200	[thread overview]
Message-ID: <5784A40F.9000908@suse.com> (raw)
In-Reply-To: <1468283787-18260-1-git-send-email-wu.wubin@huawei.com>

On 12/07/16 02:36, Bin Wu wrote:
> During scsi command queueing or exception handling, if prepairing
> fails, we need to reclaim the failed request. Otherwise, the garbage
> request will be pushed into the ring for the backend to work.
> 
> Signed-off-by: Bin Wu <wu.wubin@huawei.com>

Reviewed-by: Juergen Gross <jgross@suse.com>

> ---
>  drivers/scsi/xen-scsifront.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/xen-scsifront.c b/drivers/scsi/xen-scsifront.c
> index 9dc8687..8646db1 100644
> --- a/drivers/scsi/xen-scsifront.c
> +++ b/drivers/scsi/xen-scsifront.c
> @@ -184,8 +184,6 @@ static struct vscsiif_request *scsifront_pre_req(struct vscsifrnt_info *info)
>  
>  	ring_req = RING_GET_REQUEST(&(info->ring), ring->req_prod_pvt);
>  
> -	ring->req_prod_pvt++;
> -
>  	ring_req->rqid = (uint16_t)id;
>  
>  	return ring_req;
> @@ -196,6 +194,8 @@ static void scsifront_do_request(struct vscsifrnt_info *info)
>  	struct vscsiif_front_ring *ring = &(info->ring);
>  	int notify;
>  
> +	ring->req_prod_pvt++;
> +
>  	RING_PUSH_REQUESTS_AND_CHECK_NOTIFY(ring, notify);
>  	if (notify)
>  		notify_remote_via_irq(info->irq);
> 

      reply	other threads:[~2016-07-12  8:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-12  0:36 [PATCH v2] xen_pvscsi: reclaim the ring request when the prepairing failed Bin Wu
2016-07-12  8:02 ` Juergen Gross [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=5784A40F.9000908@suse.com \
    --to=jgross@suse.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=david.vrabel@citrix.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=wu.wubin@huawei.com \
    --cc=xen-devel@lists.xenproject.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).