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

[Xen-changelog] merge



# HG changeset patch
# User ack@xxxxxxxxxxxxxxxxxxxxxxx
# Node ID b6c5920e5d998d8055a8b2f540462ace3e860d99
# Parent  e049baa9055dfa15bbf5ed0b3c3e56fabedbc386
# Parent  24d25894f071bed67d5547c1790a075271ab1174
merge

diff -r e049baa9055d -r b6c5920e5d99 
linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c        Thu Apr  6 
17:58:01 2006
+++ b/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c        Thu Apr  6 
17:58:39 2006
@@ -287,7 +287,7 @@
  * NOTIFICATION FROM GUEST OS.
  */
 
-void blkif_notify_work(blkif_t *blkif)
+static void blkif_notify_work(blkif_t *blkif)
 {
        blkif->waiting_reqs = 1;
        wake_up(&blkif->wq);
diff -r e049baa9055d -r b6c5920e5d99 
linux-2.6-xen-sparse/drivers/xen/blkback/common.h
--- a/linux-2.6-xen-sparse/drivers/xen/blkback/common.h Thu Apr  6 17:58:01 2006
+++ b/linux-2.6-xen-sparse/drivers/xen/blkback/common.h Thu Apr  6 17:58:39 2006
@@ -129,7 +129,6 @@
 
 void blkif_xenbus_init(void);
 
-void blkif_notify_work(blkif_t *blkif);
 irqreturn_t blkif_be_int(int irq, void *dev_id, struct pt_regs *regs);
 int blkif_schedule(void *arg);
 
diff -r e049baa9055d -r b6c5920e5d99 
linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c Thu Apr  6 17:58:01 2006
+++ b/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c Thu Apr  6 17:58:39 2006
@@ -46,10 +46,29 @@
 
 static void update_blkif_status(blkif_t *blkif)
 { 
-       if (blkif->irq && blkif->vbd.bdev &&
-           (blkif->be->dev->state != XenbusStateConnected)) {
-               connect(blkif->be);
-               blkif_notify_work(blkif);
+       int err;
+
+       /* Not ready to connect? */
+       if (!blkif->irq || !blkif->vbd.bdev)
+               return;
+
+       /* Already connected? */
+       if (blkif->be->dev->state == XenbusStateConnected)
+               return;
+
+       /* Attempt to connect: exit if we fail to. */
+       connect(blkif->be);
+       if (blkif->be->dev->state != XenbusStateConnected)
+               return;
+
+       blkif->xenblkd = kthread_run(blkif_schedule, blkif,
+                                    "xvd %d %02x:%02x",
+                                    blkif->domid,
+                                    blkif->be->major, blkif->be->minor);
+       if (IS_ERR(blkif->xenblkd)) {
+               err = PTR_ERR(blkif->xenblkd);
+               blkif->xenblkd = NULL;
+               xenbus_dev_error(blkif->be->dev, err, "start xenblkd");
        }
 }
 
@@ -212,17 +231,6 @@
                        be->major = 0;
                        be->minor = 0;
                        xenbus_dev_fatal(dev, err, "creating vbd structure");
-                       return;
-               }
-
-               be->blkif->xenblkd = kthread_run(blkif_schedule, be->blkif,
-                                                "xvd %d %02x:%02x",
-                                                be->blkif->domid,
-                                                be->major, be->minor);
-               if (IS_ERR(be->blkif->xenblkd)) {
-                       err = PTR_ERR(be->blkif->xenblkd);
-                       be->blkif->xenblkd = NULL;
-                       xenbus_dev_error(dev, err, "start xenblkd");
                        return;
                }
 

_______________________________________________
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®.