ia64/xen-unstable

changeset 9522:b3cb19d2b07f

Fix save/restore bug; further rationalization of xenbus state machine
logic deferred until post 3.0.2.

Signed-off-by: Steven Hand <steven@xensource.com>
author smh22@firebug.cl.cam.ac.uk
date Wed Mar 29 18:06:27 2006 +0100 (2006-03-29)
parents d102a30417a7
children de30faffd672
files linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c	Wed Mar 29 16:50:59 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c	Wed Mar 29 18:06:27 2006 +0100
     1.3 @@ -253,15 +253,20 @@ static void frontend_changed(struct xenb
     1.4  
     1.5  	switch (frontend_state) {
     1.6  	case XenbusStateInitialising:
     1.7 -	case XenbusStateConnected:
     1.8  		break;
     1.9  
    1.10  	case XenbusStateInitialised:
    1.11 +	case XenbusStateConnected:
    1.12 +		/* Ensure we connect even when two watches fire in 
    1.13 +		   close successsion and we miss the intermediate value 
    1.14 +		   of frontend_state. */
    1.15 +		if (dev->state == XenbusStateConnected)
    1.16 +			break;
    1.17 +
    1.18  		err = connect_ring(be);
    1.19 -		if (err) {
    1.20 -			return;
    1.21 -		}
    1.22 -		update_blkif_status(be->blkif); 
    1.23 +		if (err)
    1.24 +			break;
    1.25 +		update_blkif_status(be->blkif);
    1.26  		break;
    1.27  
    1.28  	case XenbusStateClosing: