[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 3 of 3] VM generation ID save/restore and migrate



> -----Original Message-----
> From: Ian Campbell
> Sent: 16 December 2011 12:08
> To: Paul Durrant
> Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [Xen-devel] [PATCH 3 of 3] VM generation ID
> save/restore and migrate
> 
> On Fri, 2011-12-16 at 11:47 +0000, Paul Durrant wrote:
> > diff -r d44e885e0389 -r e745cfbe7e11
> tools/python/xen/lowlevel/checkpoint/libcheckpoint.c
> > --- a/tools/python/xen/lowlevel/checkpoint/libcheckpoint.c
> Fri Dec 16 11:43:52 2011 +0000
> > +++ b/tools/python/xen/lowlevel/checkpoint/libcheckpoint.c
> Fri Dec 16 11:43:53 2011 +0000
> > @@ -175,6 +175,7 @@ int checkpoint_start(checkpoint_state* s  {
> >      int hvm, rc;
> >      int flags = XCFLAGS_LIVE;
> > +    unsigned long vm_generationid_addr;
> >
> >      if (!s->domid) {
> >         s->errstr = "checkpoint state not opened"; @@ -185,16
> +186,28
> > @@ int checkpoint_start(checkpoint_state* s
> >
> >      hvm = s->domtype > dt_pv;
> >      if (hvm) {
> > +       char path[128];
> > +       char *addr;
> > +
> > +       sprintf(path,
> > + "/local/domain/%u/hvmloader/generation-id-address", s->domid);
> 
> xs_get_domain_path() gives you the correct base path (I saw at least
> one more of these).
> 

Does that save me anything? I'd end up having to

sprintf(path, "%s/hvmloader/generation-id-address", xs_get_domain_path(s->xsh, 
s->domid))

since xs_read() just takes a path rather than a (prefix, node) couple.

  Paul

> > diff -r d44e885e0389 -r e745cfbe7e11 tools/xcutils/xc_restore.c
> > --- a/tools/xcutils/xc_restore.c        Fri Dec 16 11:43:52 2011
> +0000
> > +++ b/tools/xcutils/xc_restore.c        Fri Dec 16 11:43:53 2011
> +0000
> [...]
> > diff -r d44e885e0389 -r e745cfbe7e11 tools/xcutils/xc_save.c
> > --- a/tools/xcutils/xc_save.c   Fri Dec 16 11:43:52 2011 +0000
> > +++ b/tools/xcutils/xc_save.c   Fri Dec 16 11:43:53 2011 +0000
> [...]
> 
> AFAIK these two are only used by xend so unless you are adding
> support for this stuff there (it's deprecated so no need) this isn't
> necessary, also I think xend reads the stdout of one or both and
> you've added to what gets printed, running the risk of breaking
> things.
> 
> Ian.
> 

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.