[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [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.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.