[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-3.4-testing] Fix for fs-backend crash when xend was not started after system boot.
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |