All of lore.kernel.org
 help / color / mirror / Atom feed
* Why xs_domain_open() in fs_backend
@ 2010-10-13  7:19 Jiang, Yunhong
  2010-10-13  8:47 ` Tim Deegan
  2010-10-13 12:57 ` Ian Campbell
  0 siblings, 2 replies; 18+ messages in thread
From: Jiang, Yunhong @ 2010-10-13  7:19 UTC (permalink / raw)
  To: samuel.thibault@eu.citrix.com, gm281@cam.ac.uk
  Cc: xen-devel@lists.xensource.com

I always get error on fs-backend when I was trying the stubdomain. The error is either " fs-backend: xenbus_get_watch_fd: could not setup watch: Invalid argument" or "fs-backend: xenbus_get_watch_fd: could not setup watch: Bad file descriptor".

I tried to debug it, seems it failed when fs-backend access the /proc/xen/xenbus file to setup a watch. It failed either because write the file failed or read the reply back failed. Further investigation does not make much progress. (I'm using PVops dom0 and latest upstream xen).

Later I noticed that the fs-backend utilize xs_domain_open(), instead of xs_daemon_open(), to communicate with xenstore. grep "xs_domain_open", I noticed it is in fact only used in xenstore_client.c, (xl use it when xs_daemon_open failed, but I suspect if it is really tested), and the xenstore_client.c does not use watch feature at all.

Following simple patch make it work, but I'm not sure if it is the right method, will fs-backend run in other domain?

Thanks
--jyh

diff -r a33886146b45 tools/fs-back/fs-backend.c
--- a/tools/fs-back/fs-backend.c    Fri Oct 08 11:41:57 2010 +0100
+++ b/tools/fs-back/fs-backend.c    Wed Oct 13 15:10:22 2010 +0800
@@ -462,7 +462,7 @@ int main(void)
     sigaction(SIGUSR2, &act, NULL);

     /* Open the connection to XenStore first */
-    xsh = xs_domain_open();
+    xsh = xs_daemon_open();
     assert(xsh != NULL);
     xs_rm(xsh, XBT_NULL, ROOT_NODE);
     /* Create watch node */
diff -r a33886146b45 tools/fs-back/fs-backend.h
--- a/tools/fs-back/fs-backend.h    Fri Oct 08 11:41:57 2010 +0100
+++ b/tools/fs-back/fs-backend.h    Wed Oct 13 15:10:33 2010 +0800
@@ -9,7 +9,7 @@
 #include <xen/io/fsif.h>
 #include "sys-queue.h"

-#define ROOT_NODE           "backend/vfs"
+#define ROOT_NODE           "/local/domain/0/backend/vfs"
 #define EXPORTS_SUBNODE     "exports"
 #define EXPORTS_NODE        ROOT_NODE"/"EXPORTS_SUBNODE
 #define WATCH_NODE          EXPORTS_NODE"/requests"
~
~

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2010-10-21 17:15 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-13  7:19 Why xs_domain_open() in fs_backend Jiang, Yunhong
2010-10-13  8:47 ` Tim Deegan
2010-10-13  9:13   ` Jiang, Yunhong
2010-10-13  9:24     ` Tim Deegan
2010-10-13 10:30       ` Stefano Stabellini
2010-10-13 12:20         ` Jiang, Yunhong
2010-10-13 13:53     ` Ian Campbell
2010-10-13 13:59       ` Jiang, Yunhong
2010-10-13 12:57 ` Ian Campbell
2010-10-13 13:18   ` Ian Campbell
2010-10-13 13:47     ` Ian Campbell
2010-10-13 14:04       ` Jiang, Yunhong
2010-10-13 15:34         ` Ian Campbell
2010-10-15  2:29           ` Jiang, Yunhong
2010-10-15  6:49             ` Ian Campbell
2010-10-15  6:55               ` Jiang, Yunhong
2010-10-21 16:57       ` Ian Jackson
2010-10-21 17:15   ` Ian Jackson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.