All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Deegan <Tim.Deegan@citrix.com>
To: "Jiang, Yunhong" <yunhong.jiang@intel.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	"gm281@cam.ac.uk" <gm281@cam.ac.uk>,
	"samuel.thibault@eu.citrix.com" <samuel.thibault@eu.citrix.com>
Subject: Re: Why xs_domain_open() in fs_backend
Date: Wed, 13 Oct 2010 10:24:39 +0100	[thread overview]
Message-ID: <20101013092439.GH4007@whitby.uk.xensource.com> (raw)
In-Reply-To: <789F9655DD1B8F43B48D77C5D30659732F9D7FA3@shsmsx501.ccr.corp.intel.com>

At 10:13 +0100 on 13 Oct (1286964818), Jiang, Yunhong wrote:
> When I firstly checking the code, I also think the xs_domain_open()
> should be more approprate. But it is a bit surprise that it is not
> used at all, except one utility , xentore-client.c , in xenstore
> directory, which definitely not need this (I assume xenstore-ls should
> always be in same domain as xenstore daemon).  I suspect if
> xs_domain_open() and the xenfs is really widely tested.

I had thought it was used by stubdom qemu, but it seems not - not sure
how that works then.  It isn't specifically tested but I know that some
people have been using it successfully in the last month or two.

> >
> >(IMHO xs_daemon_open() should be killed entirely, but there are some
> >dom0 kernels where the xs_domain_open() connection isn't allowed to send
> >XS_INTRODUCE commands.  That shouldn't make a difference here, though).
> 
> But we should at least add xs_domain_close() firstly, matching
> xs_domain_open() with xs_deamon_close() is really something strange :-)

I think the right thing to do would be have xs_daemon_open hide the
details of whether the connection is over a socket or xenbus, and not
have every caller have to care about that.

In the meantime if the domain connection isn't working for you, you
could always copy the logic from libxl of trying daemon first.

Tim.

> >> Following simple patch make it work, but I'm not sure if it is the
> >> right method, will fs-backend run in other domain?
> >
> >What does the change to ROOT_NODE do in this patch?  Any chance that it
> >fixes the problem by itself? :)
> 
> No, it does not work.
> 
> Thanks
> --jyh
> 
> >
> >Cheers,
> >
> >Tim.
> >
> >> 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"
> >> ~
> >> ~
> >>
> >> _______________________________________________
> >> Xen-devel mailing list
> >> Xen-devel@lists.xensource.com
> >> http://lists.xensource.com/xen-devel
> >
> >--
> >Tim Deegan <Tim.Deegan@citrix.com>
> >Principal Software Engineer, XenServer Engineering
> >Citrix Systems UK Ltd.  (Company #02937203, SL9 0BG)

-- 
Tim Deegan <Tim.Deegan@citrix.com>
Principal Software Engineer, XenServer Engineering
Citrix Systems UK Ltd.  (Company #02937203, SL9 0BG)

  reply	other threads:[~2010-10-13  9:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101013092439.GH4007@whitby.uk.xensource.com \
    --to=tim.deegan@citrix.com \
    --cc=gm281@cam.ac.uk \
    --cc=samuel.thibault@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    --cc=yunhong.jiang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.