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: Improvements to wait_for_devi

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] xenbus: Improvements to wait_for_devices().
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 27 Jul 2007 02:35:39 -0700
Delivery-date: Fri, 27 Jul 2007 02:33:41 -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 1185366573 -3600
# Node ID 726cd201f4cde2be30657ee8690bc8e47260eb6a
# Parent  3b0bce92b2f254242c785d2662776e04a0817301
xenbus: Improvements to wait_for_devices().
 1. When printing a warning about a timed-out device, print the
 current state of both ends of the device connection (i.e., backend as
 well as frontend).
 2. A device is 'not yet connected' only when the local state is *less
 than* XenbusStateConnected. If the state is Closing or Closed
 (usually because of an explicit failure when trying to make the
 connection) then we should not wait for the connection to occur -- it
 will never happen!

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 drivers/xen/xenbus/xenbus_probe.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff -r 3b0bce92b2f2 -r 726cd201f4cd drivers/xen/xenbus/xenbus_probe.c
--- a/drivers/xen/xenbus/xenbus_probe.c Tue Jul 24 17:09:09 2007 +0100
+++ b/drivers/xen/xenbus/xenbus_probe.c Wed Jul 25 13:29:33 2007 +0100
@@ -1034,7 +1034,7 @@ static int is_disconnected_device(struct
                return 0;
 
        xendrv = to_xenbus_driver(dev->driver);
-       return (xendev->state != XenbusStateConnected ||
+       return (xendev->state < XenbusStateConnected ||
                (xendrv->is_ready && !xendrv->is_ready(xendev)));
 }
 
@@ -1059,10 +1059,13 @@ static int print_device_status(struct de
                /* Information only: is this too noisy? */
                printk(KERN_INFO "XENBUS: Device with no driver: %s\n",
                       xendev->nodename);
-       } else if (xendev->state != XenbusStateConnected) {
+       } else if (xendev->state < XenbusStateConnected) {
+               enum xenbus_state rstate = XenbusStateUnknown;
+               if (xendev->otherend)
+                       rstate = xenbus_read_driver_state(xendev->otherend);
                printk(KERN_WARNING "XENBUS: Timeout connecting "
-                      "to device: %s (state %d)\n",
-                      xendev->nodename, xendev->state);
+                      "to device: %s (local state %d, remote state %d)\n",
+                      xendev->nodename, xendev->state, rstate);
        }
 
        return 0;

_______________________________________________
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: Improvements to wait_for_devices()., Xen patchbot-linux-2.6.18-xen <=