From: Chen Gang <gang.chen.5i5j@gmail.com>
To: David Vrabel <david.vrabel@citrix.com>
Cc: konrad.wilk@oracle.com, boris.ostrovsky@oracle.com,
stefano.stabellini@eu.citrix.com, mukesh.rathor@oracle.com,
xen-devel@lists.xenproject.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [Xen-devel] [PATCH 3/3 v2] xen/xenbus: Improve failure processing code for __xenbus_switch_state()
Date: Tue, 23 Sep 2014 09:56:17 +0800 [thread overview]
Message-ID: <5420D341.9060301@gmail.com> (raw)
In-Reply-To: <542047EA.6090202@citrix.com>
On 9/23/14 0:01, David Vrabel wrote:
> On 22/09/14 16:51, Chen Gang wrote:
>> On 09/22/2014 11:04 PM, David Vrabel wrote:
>>> On 18/09/14 15:01, Chen Gang wrote:
>>>> When failure occurs, need return failure code instead of 0, or some of
>>>> indirect upper callers may misunderstand.
>>>>
>>>> e.g. in "block/xen-blkback/xenbus.c":
>>>>
>>>> connect() -> xenbus_switch_state() -> __xenbus_switch_state().
>>>
>>> Can you make xenbus_switch_state() void? The callers don't need to do
>>> any error handling.
>>>
>>
>> After "grep rn xenbus_switch_state *" under "drivers/", it is not one
>> place to check the return value of xenbus_switch_state(), and also it
>> is export to outside for individual modules.
>>
>> So we need change many subsystems for it, and also need face the rick
>> for incompatible with the old individual modules which source code are
>> not in upstream.
>
> Having to update 9 callers doesn't seem like much work.
>
OK, thanks, and I guess, we need not care about the individual modules
which source code are not in upstream.
>> And are you sure the caller need not notice about it, when it really
>> fails? (for me, I guess they need notice about it)
>
> Yes. xenbus_switch_state() already signals the fatal error to the
> toolstack with xenbus_dev_fatal().
>
OK, what you said sound reasonable to me, I shall send patch v3 for it
within this week (do not consider about the individual modules which
source code are not in upstream).
Thanks.
--
Chen Gang
Open, share, and attitude like air, water, and life which God blessed
next prev parent reply other threads:[~2014-09-23 1:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-18 13:58 [PATCH 0/3 v2] xen/xenbus: Several improvements for 'xenbus_client.c' Chen Gang
2014-09-18 13:59 ` [PATCH 1/3 v2] xen/xenbus: Correct the comments for xenbus_grant_ring() Chen Gang
2014-09-18 13:59 ` Chen Gang
2014-09-18 14:00 ` [PATCH 2/3 v2] xen/xenbus: Remove BUG_ON() when error string trucated Chen Gang
2014-09-18 14:00 ` Chen Gang
2014-09-18 14:01 ` [PATCH 3/3 v2] xen/xenbus: Improve failure processing code for __xenbus_switch_state() Chen Gang
2014-09-18 14:01 ` Chen Gang
2014-09-22 15:04 ` [Xen-devel] " David Vrabel
2014-09-22 15:51 ` Chen Gang
2014-09-22 16:01 ` David Vrabel
2014-09-23 1:56 ` Chen Gang
2014-09-23 1:56 ` Chen Gang [this message]
2014-09-22 16:01 ` David Vrabel
2014-09-22 15:51 ` Chen Gang
2014-09-22 15:04 ` David Vrabel
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=5420D341.9060301@gmail.com \
--to=gang.chen.5i5j@gmail.com \
--cc=boris.ostrovsky@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mukesh.rathor@oracle.com \
--cc=stefano.stabellini@eu.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.