aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsmh22@firebug.cl.cam.ac.uk <smh22@firebug.cl.cam.ac.uk>2006-03-29 18:06:27 +0100
committersmh22@firebug.cl.cam.ac.uk <smh22@firebug.cl.cam.ac.uk>2006-03-29 18:06:27 +0100
commit473e020902bd7413b979e047429e2096e3933825 (patch)
treef0f46999abca23b9bbd7c24ae7e604de6ee9b2ff
parent4df87c91b1f5c65f96a98cdf66ee783dac649329 (diff)
downloadxen-473e020902bd7413b979e047429e2096e3933825.tar.gz
xen-473e020902bd7413b979e047429e2096e3933825.tar.bz2
xen-473e020902bd7413b979e047429e2096e3933825.zip
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>
-rw-r--r--linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c b/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c
index 82625a9715..23fe51a362 100644
--- a/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c
+++ b/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c
@@ -253,15 +253,20 @@ static void frontend_changed(struct xenbus_device *dev,
switch (frontend_state) {
case XenbusStateInitialising:
- case XenbusStateConnected:
break;
case XenbusStateInitialised:
+ case XenbusStateConnected:
+ /* Ensure we connect even when two watches fire in
+ close successsion and we miss the intermediate value
+ of frontend_state. */
+ if (dev->state == XenbusStateConnected)
+ break;
+
err = connect_ring(be);
- if (err) {
- return;
- }
- update_blkif_status(be->blkif);
+ if (err)
+ break;
+ update_blkif_status(be->blkif);
break;
case XenbusStateClosing: