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] [xen-3.4-testing] Fix for fs-backend crash when xend was

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.4-testing] Fix for fs-backend crash when xend was not started after system boot.
From: "Xen patchbot-3.4-testing" <patchbot-3.4-testing@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 22 Feb 2010 10:55:25 -0800
Delivery-date: Mon, 22 Feb 2010 10:58:20 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1266864656 0
# Node ID ea8425a5313c45be39a7c852e864634d64c75b21
# Parent  c4cb98fe0d59b88c74e0e9d2417989575b5af31d
Fix for fs-backend crash when xend was not started after system boot.

Signed-off-by: Daniel Kiper <dkiper@xxxxxxxxxxxx>
xen-unstable changeset:   20962:243614f8360c
xen-unstable date:        Mon Feb 22 10:06:21 2010 +0000
---
 tools/fs-back/fs-backend.c |    3 ++-
 tools/fs-back/fs-xenbus.c  |    7 +++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff -r c4cb98fe0d59 -r ea8425a5313c tools/fs-back/fs-backend.c
--- a/tools/fs-back/fs-backend.c        Mon Feb 22 18:49:46 2010 +0000
+++ b/tools/fs-back/fs-backend.c        Mon Feb 22 18:50:56 2010 +0000
@@ -299,7 +299,8 @@ static void await_connections(void)
     LIST_INIT (&mount_requests_head);
 
     assert(xsh != NULL);
-    fd = xenbus_get_watch_fd(); 
+    if ((fd = xenbus_get_watch_fd()) == -1)
+           err(1, "xenbus_get_watch_fd: could not setup watch");
     /* Infinite watch loop */
     do {
        FD_ZERO(&fds);
diff -r c4cb98fe0d59 -r ea8425a5313c tools/fs-back/fs-xenbus.c
--- a/tools/fs-back/fs-xenbus.c Mon Feb 22 18:49:46 2010 +0000
+++ b/tools/fs-back/fs-xenbus.c Mon Feb 22 18:50:56 2010 +0000
@@ -105,11 +105,18 @@ int xenbus_get_watch_fd(void)
 int xenbus_get_watch_fd(void)
 {
     int res;
+#if DEBUG
+    int errno_orig;
+#endif
     assert(xsh != NULL);
     res = xs_watch(xsh, WATCH_NODE, "conn-watch");
     if (!res) {
+#if DEBUG
+       errno_orig = errno;
         FS_DEBUG("ERROR: xs_watch %s failed ret=%d errno=%d\n",
                  WATCH_NODE, res, errno);
+       errno = errno_orig;
+#endif
         return -1;
     }
     return xs_fileno(xsh); 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.4-testing] Fix for fs-backend crash when xend was not started after system boot., Xen patchbot-3.4-testing <=