From: Julien Grall <julien.grall@citrix.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>,
xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>,
David Vrabel <david.vrabel@citrix.com>
Subject: Re: [Xen-devel] [PATCH v2 2/2] block/xen-blkfront: Handle non-indirect grant with 64KB pages
Date: Thu, 12 Nov 2015 18:04:04 +0000 [thread overview]
Message-ID: <5644D494.3030700@citrix.com> (raw)
In-Reply-To: <5644D19B.4000900@citrix.com>
On 12/11/15 17:51, Roger Pau Monné wrote:
> El 12/11/15 a les 18.30, Julien Grall ha escrit:
>> Hi,
>>
>> On 12/11/15 16:40, Roger Pau Monné wrote:
>>>> [1] http://lists.xen.org/archives/html/xen-devel/2015-08/msg02200.html
>>>>
>>>> Signed-off-by: Julien Grall <julien.grall@citrix.com>
>>>
>>> LGTM, only a couple of typos and a simplification:
>>>
>>> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
>>
>> Do you mean Acked-by? ;)
>
> Yes, I also had problems with smtp, so I thought this one was actually
> not sent. You have another one with a proper Ack :).
>
>>>> +
>>>> + /* The I/O request may be split in two */
>>>> + if (unlikely(s->associated_id != NO_ASSOCIATED_ID)) {
>>>> + struct blk_shadow *s2 = &info->shadow[s->associated_id];
>>>> +
>>>> + /* Keep the status of the current response in shadow */
>>>> + s->status = (bret->status == BLKIF_RSP_OKAY) ?
>>>> + REQ_DONE : REQ_FAIL;
>>>> +
>>>> + /* Wait the second response if not yet here */
>>>> + if (s2->status == REQ_WAITING)
>>>> + return 0;
>>>> +
>>>> + /*
>>>> + * The status of the current response will be used in
>>>> + * order to know if the request has failed.
>>>> + * Update the current response status only if has not
>>>> + * failed.
>>>> + */
>>>> + if (bret->status == BLKIF_RSP_OKAY && s2->status == REQ_FAIL)
>>>
>>> This could be simplified by only checking if s2->status == REQ_FAIL.
>>
>> I didn't do it because bret->status may be different than
>> BLKIF_RSP_ERROR (for instance BLKIF_RSP_EOPNOTSUPP).
>
> I think this is not actually possible in practice, but what if
> bret->status == BLKIF_RSP_OKAY and the bret from s2 actually had
> BLKIF_RSP_EOPNOTSUPP, wouldn't we loose the EOPNOTSUPP by
> unconditionally setting BLKIF_RSP_ERROR?
No because EOPNOTSUPP are used when an operation is not supported. As
the 2 ring request is coming from the same I/O request, it will always
have the same operation.
So if one get EOPNOTSUPP the other will get too.
>
> Should s->status be able to store all the possible return codes from the
> response (OK/ERROR/NOTSUPP)?
That could would work. However, how do you decide which will be the
final status?
Regards,
--
Julien Grall
next prev parent reply other threads:[~2015-11-12 18:05 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-19 14:19 [PATCH v2 0/2] block/xen-blkfront: Support non-indirect grant with 64KB page granularity Julien Grall
2015-10-19 14:19 ` [PATCH v2 1/2] block/xen-blkfront: Introduce blkif_ring_get_request Julien Grall
2015-10-19 14:19 ` Julien Grall
2015-10-19 14:19 ` [PATCH v2 2/2] block/xen-blkfront: Handle non-indirect grant with 64KB pages Julien Grall
2015-10-19 14:19 ` Julien Grall
2015-11-12 16:40 ` Roger Pau Monné
2015-11-12 16:40 ` Roger Pau Monné
2015-11-12 17:30 ` Julien Grall
2015-11-12 17:30 ` [Xen-devel] " Julien Grall
2015-11-12 17:51 ` Roger Pau Monné
2015-11-12 18:04 ` Julien Grall [this message]
2015-11-12 18:24 ` Roger Pau Monné
2015-11-12 18:32 ` Julien Grall
2015-11-12 18:32 ` Julien Grall
2015-11-12 18:24 ` Roger Pau Monné
2015-11-12 18:04 ` Julien Grall
2015-11-12 17:51 ` Roger Pau Monné
2015-11-12 16:45 ` Roger Pau Monné
2015-11-12 16:45 ` Roger Pau Monné
2015-11-09 15:51 ` [PATCH v2 0/2] block/xen-blkfront: Support non-indirect grant with 64KB page granularity Julien Grall
2015-11-09 16:05 ` Konrad Rzeszutek Wilk
2015-11-18 17:34 ` [Xen-devel] " Julien Grall
2015-11-18 17:34 ` Julien Grall
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=5644D494.3030700@citrix.com \
--to=julien.grall@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=linux-kernel@vger.kernel.org \
--cc=roger.pau@citrix.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.