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

[Xen-changelog] [linux-2.6.18-xen] xenbus: Wait for 30s for devices to connect (previously 10s).



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1185266340 -3600
# Node ID d88e59a7334ae584900a9f7221d494bcd9ef2a63
# Parent  c68699484a654681a2912e70411286f13119c01f
xenbus: Wait for 30s for devices to connect (previously 10s).
Give a visual update to the user on the console every 5s during this
period.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 drivers/xen/xenbus/xenbus_probe.c |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)

diff -r c68699484a65 -r d88e59a7334a drivers/xen/xenbus/xenbus_probe.c
--- a/drivers/xen/xenbus/xenbus_probe.c Thu Jul 19 13:28:14 2007 +0100
+++ b/drivers/xen/xenbus/xenbus_probe.c Tue Jul 24 09:39:00 2007 +0100
@@ -1072,7 +1072,7 @@ static int ready_to_wait_for_devices;
 static int ready_to_wait_for_devices;
 
 /*
- * On a 10 second timeout, wait for all devices currently configured.  We need
+ * On a 30-second timeout, wait for all devices currently configured.  We need
  * to do this to guarantee that the filesystems and / or network devices
  * needed for boot are available, before we can allow the boot to proceed.
  *
@@ -1087,17 +1087,29 @@ static int ready_to_wait_for_devices;
  */
 static void wait_for_devices(struct xenbus_driver *xendrv)
 {
-       unsigned long timeout = jiffies + 10*HZ;
+       unsigned long start = jiffies;
        struct device_driver *drv = xendrv ? &xendrv->driver : NULL;
+       unsigned int seconds_waited = 0;
 
        if (!ready_to_wait_for_devices || !is_running_on_xen())
                return;
 
        while (exists_disconnected_device(drv)) {
-               if (time_after(jiffies, timeout))
-                       break;
+               if (time_after(jiffies, start + (seconds_waited+5)*HZ)) {
+                       if (!seconds_waited)
+                               printk(KERN_WARNING "XENBUS: Waiting for "
+                                      "devices to initialise: ");
+                       seconds_waited += 5;
+                       printk("%us...", 30 - seconds_waited);
+                       if (seconds_waited == 30)
+                               break;
+               }
+               
                schedule_timeout_interruptible(HZ/10);
        }
+
+       if (seconds_waited)
+               printk("\n");
 
        bus_for_each_dev(&xenbus_frontend.bus, NULL, drv,
                         print_device_status);

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