[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130924152611.GA14211@zion.uk.xensource.com>
Date: Tue, 24 Sep 2013 16:26:12 +0100
From: Wei Liu <wei.liu2@...rix.com>
To: Paul Durrant <paul.durrant@...rix.com>
CC: <xen-devel@...ts.xen.org>, <netdev@...r.kernel.org>,
Ian Campbell <ian.campbell@...rix.com>,
Wei Liu <wei.liu2@...rix.com>,
David Vrabel <david.vrabel@...rix.com>
Subject: Re: [PATCH net v3 1/1] xen-netback: Handle backend state transitions
in a more robust way
On Tue, Sep 24, 2013 at 03:51:22PM +0100, Paul Durrant wrote:
> When the frontend state changes metback now specifies its desired state to
netback
> a new function, set_backend_state(), which transitions through any
[...]
> +/* Handle backend state transitions:
> + *
> + * The backend state starts in InitWait and the following transtions are
transitions
> + * allowed.
>
[...]
> @@ -363,7 +448,9 @@ static void hotplug_status_changed(struct xenbus_watch *watch,
> if (IS_ERR(str))
> return;
> if (len == sizeof("connected")-1 && !memcmp(str, "connected", len)) {
> - xenbus_switch_state(be->dev, XenbusStateConnected);
> + /* Complete any pending state change */
> + xenbus_switch_state(be->dev, be->state);
> +
The state transition takes place iff hotplug status is "connected", is
this desirable? What if hotplug fails?
If it cycles through connect again it looks like it will trigger that
BUG_ON in connect()?
Wei.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists