WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] xenbus: Wait for 30s for devices to c

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] xenbus: Wait for 30s for devices to connect (previously 10s).
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 27 Jul 2007 02:34:57 -0700
Delivery-date: Fri, 27 Jul 2007 02:33:19 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] xenbus: Wait for 30s for devices to connect (previously 10s)., Xen patchbot-linux-2.6.18-xen <=