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

[Xen-changelog] [xen-unstable] [BLKFRONT] Only attempt to recover a device on resume if it was connected when



# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
# Node ID c98a8e2c62d1870f804bf6290ac559c63703bba0
# Parent  4ddda0bbb57c025b8620af613def2c2bbb8b77ae
[BLKFRONT] Only attempt to recover a device on resume if it was connected when
we suspended.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -r 4ddda0bbb57c -r c98a8e2c62d1 
linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c      Thu Nov 23 
09:36:48 2006 +0000
+++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c      Thu Nov 23 
15:06:35 2006 +0000
@@ -138,10 +138,10 @@ static int blkfront_resume(struct xenbus
 
        DPRINTK("blkfront_resume: %s\n", dev->nodename);
 
-       blkif_free(info, 1);
+       blkif_free(info, info->connected == BLKIF_STATE_CONNECTED);
 
        err = talk_to_backend(dev, info);
-       if (!err)
+       if (info->connected == BLKIF_STATE_SUSPENDED && !err)
                blkif_recover(info);
 
        return err;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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