All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bin Wu <wu.wubin@huawei.com>
To: Juergen Gross <jgross@suse.com>,
	David Vrabel <david.vrabel@citrix.com>,
	boris.ostrovsky@oracle.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: [Xen-devel] [PATCH] xen_pvscsi: reclaim the ring request when mapping data failed
Date: Tue, 12 Jul 2016 08:29:41 +0800	[thread overview]
Message-ID: <578439F5.4090400@huawei.com> (raw)
In-Reply-To: <57836CB5.90401@suse.com>

On 2016/7/11 17:53, Juergen Gross wrote:
> On 11/07/16 11:50, David Vrabel wrote:
>> On 11/07/16 10:33, Juergen Gross wrote:
>>> On 11/07/16 04:51, Bin Wu wrote:
>>>> During scsi command queueing, if mapping data fails, we need to
>>>> reclaim the failed request. Otherwise, the garbage request will
>>>> be pushed into the ring for the backend to work.
>>> Well spotted. There is another instance of this problem in
>>> scsifront_action_handler(). Would you mind correcting this one, too?
>> Would it make more sense to advance req_prod_pvt only if the request has
>> been successfully created?
> Yeah, probably as the first action in scsifront_do_request().
>
>
> Juergen
ok, I will send a new patch : )
>
>> David
>>
>>>> Signed-off-by: Bin Wu <wu.wubin@huawei.com>
>>>> ---
>>>>   drivers/scsi/xen-scsifront.c | 1 +
>>>>   1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/drivers/scsi/xen-scsifront.c b/drivers/scsi/xen-scsifront.c
>>>> index 9dc8687..655163d 100644
>>>> --- a/drivers/scsi/xen-scsifront.c
>>>> +++ b/drivers/scsi/xen-scsifront.c
>>>> @@ -565,6 +565,7 @@ static int scsifront_queuecommand(struct Scsi_Host
>>>> *shost,
>>>>       err = map_data_for_request(info, sc, ring_req, shadow);
>>>>       if (err < 0) {
>>>>           pr_debug("%s: err %d\n", __func__, err);
>>>> +        info->ring.req_prod_pvt--;
>>>>           scsifront_put_rqid(info, rqid);
>>>>           scsifront_return(info);
>>>>           spin_unlock_irqrestore(shost->host_lock, flags);
>>>
>>> _______________________________________________
>>> Xen-devel mailing list
>>> Xen-devel@lists.xen.org
>>> https://lists.xen.org/xen-devel
>>>
>>
>
> .
>



WARNING: multiple messages have this Message-ID (diff)
From: Bin Wu <wu.wubin@huawei.com>
To: Juergen Gross <jgross@suse.com>,
	David Vrabel <david.vrabel@citrix.com>,
	<boris.ostrovsky@oracle.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: [Xen-devel] [PATCH] xen_pvscsi: reclaim the ring request when mapping data failed
Date: Tue, 12 Jul 2016 08:29:41 +0800	[thread overview]
Message-ID: <578439F5.4090400@huawei.com> (raw)
In-Reply-To: <57836CB5.90401@suse.com>

On 2016/7/11 17:53, Juergen Gross wrote:
> On 11/07/16 11:50, David Vrabel wrote:
>> On 11/07/16 10:33, Juergen Gross wrote:
>>> On 11/07/16 04:51, Bin Wu wrote:
>>>> During scsi command queueing, if mapping data fails, we need to
>>>> reclaim the failed request. Otherwise, the garbage request will
>>>> be pushed into the ring for the backend to work.
>>> Well spotted. There is another instance of this problem in
>>> scsifront_action_handler(). Would you mind correcting this one, too?
>> Would it make more sense to advance req_prod_pvt only if the request has
>> been successfully created?
> Yeah, probably as the first action in scsifront_do_request().
>
>
> Juergen
ok, I will send a new patch : )
>
>> David
>>
>>>> Signed-off-by: Bin Wu <wu.wubin@huawei.com>
>>>> ---
>>>>   drivers/scsi/xen-scsifront.c | 1 +
>>>>   1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/drivers/scsi/xen-scsifront.c b/drivers/scsi/xen-scsifront.c
>>>> index 9dc8687..655163d 100644
>>>> --- a/drivers/scsi/xen-scsifront.c
>>>> +++ b/drivers/scsi/xen-scsifront.c
>>>> @@ -565,6 +565,7 @@ static int scsifront_queuecommand(struct Scsi_Host
>>>> *shost,
>>>>       err = map_data_for_request(info, sc, ring_req, shadow);
>>>>       if (err < 0) {
>>>>           pr_debug("%s: err %d\n", __func__, err);
>>>> +        info->ring.req_prod_pvt--;
>>>>           scsifront_put_rqid(info, rqid);
>>>>           scsifront_return(info);
>>>>           spin_unlock_irqrestore(shost->host_lock, flags);
>>>
>>> _______________________________________________
>>> Xen-devel mailing list
>>> Xen-devel@lists.xen.org
>>> https://lists.xen.org/xen-devel
>>>
>>
>
> .
>

  parent reply	other threads:[~2016-07-12  0:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-11  2:51 [PATCH] xen_pvscsi: reclaim the ring request when mapping data failed Bin Wu
2016-07-11  2:51 ` Bin Wu
2016-07-11  9:33 ` Juergen Gross
2016-07-11  9:50   ` David Vrabel
2016-07-11  9:50   ` [Xen-devel] " David Vrabel
2016-07-11  9:50     ` David Vrabel
2016-07-11  9:53     ` Juergen Gross
2016-07-11  9:53       ` [Xen-devel] " Juergen Gross
2016-07-12  0:29       ` Bin Wu
2016-07-12  0:29       ` Bin Wu [this message]
2016-07-12  0:29         ` [Xen-devel] " Bin Wu
2016-07-11  9:33 ` Juergen Gross

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=578439F5.4090400@huawei.com \
    --to=wu.wubin@huawei.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=david.vrabel@citrix.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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 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.