Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1440220 > unrolled thread
| Started by | Bin Wu <wu.wubin@huawei.com> |
|---|---|
| First post | 2016-07-11 05:00 +0200 |
| Last post | 2016-07-11 12:00 +0200 |
| Articles | 5 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] xen_pvscsi: reclaim the ring request when mapping data failed Bin Wu <wu.wubin@huawei.com> - 2016-07-11 05:00 +0200
Re: [PATCH] xen_pvscsi: reclaim the ring request when mapping data failed Juergen Gross <jgross@suse.com> - 2016-07-11 11:40 +0200
Re: [Xen-devel] [PATCH] xen_pvscsi: reclaim the ring request when mapping data failed Juergen Gross <jgross@suse.com> - 2016-07-11 12:00 +0200
Re: [Xen-devel] [PATCH] xen_pvscsi: reclaim the ring request when mapping data failed Bin Wu <wu.wubin@huawei.com> - 2016-07-12 02:40 +0200
Re: [Xen-devel] [PATCH] xen_pvscsi: reclaim the ring request when mapping data failed David Vrabel <david.vrabel@citrix.com> - 2016-07-11 12:00 +0200
| From | Bin Wu <wu.wubin@huawei.com> |
|---|---|
| Date | 2016-07-11 05:00 +0200 |
| Subject | [PATCH] xen_pvscsi: reclaim the ring request when mapping data failed |
| Message-ID | <rTzBU-14B-5@gated-at.bofh.it> |
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.
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);
--
2.3.2 (Apple Git-55)
[toc] | [next] | [standalone]
| From | Juergen Gross <jgross@suse.com> |
|---|---|
| Date | 2016-07-11 11:40 +0200 |
| Subject | Re: [PATCH] xen_pvscsi: reclaim the ring request when mapping data failed |
| Message-ID | <rTFR0-59c-19@gated-at.bofh.it> |
| In reply to | #1440220 |
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?
Juergen
>
> 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);
[toc] | [prev] | [next] | [standalone]
| From | Juergen Gross <jgross@suse.com> |
|---|---|
| Date | 2016-07-11 12:00 +0200 |
| Subject | Re: [Xen-devel] [PATCH] xen_pvscsi: reclaim the ring request when mapping data failed |
| Message-ID | <rTGal-5j1-5@gated-at.bofh.it> |
| In reply to | #1440401 |
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
>
> 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
>>
>
>
[toc] | [prev] | [next] | [standalone]
| From | Bin Wu <wu.wubin@huawei.com> |
|---|---|
| Date | 2016-07-12 02:40 +0200 |
| Subject | Re: [Xen-devel] [PATCH] xen_pvscsi: reclaim the ring request when mapping data failed |
| Message-ID | <rTTTX-5WU-11@gated-at.bofh.it> |
| In reply to | #1440403 |
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
>>>
>>
>
> .
>
[toc] | [prev] | [next] | [standalone]
| From | David Vrabel <david.vrabel@citrix.com> |
|---|---|
| Date | 2016-07-11 12:00 +0200 |
| Subject | Re: [Xen-devel] [PATCH] xen_pvscsi: reclaim the ring request when mapping data failed |
| Message-ID | <rTGal-5j1-7@gated-at.bofh.it> |
| In reply to | #1440401 |
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?
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
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web