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

Re: [Xen-devel] [PATCH 09/27] tools/libxl: Pass restore_fd as a parameter to libxl__xc_domain_restore()



On Mon, 2015-06-15 at 14:44 +0100, Andrew Cooper wrote:
> If a conversion of a legacy stream is needed, libxl__xc_domain_restore() will
> need to use an fd other to the one found in the domain_create_state.
> 
> No functional change.

It could be argued that the one in domain_create_state should always be
the correct one. If that means that it differs from the one ultimately
passed in by the user then the original ought to be saved in the state
associated with the filter as its input and the filter's output plumbed
into domain_create_state instead.

I'll reserve judgement until I see a bit more of how this pans out
through the series.

> @@ -41,13 +41,13 @@ static void helper_exited(libxl__egc *egc, 
> libxl__ev_child *ch,
>  /*----- entrypoints -----*/
>  
>  void libxl__xc_domain_restore(libxl__egc *egc, libxl__domain_create_state 
> *dcs,
> +                              int restore_fd,

Assuming we go this way: can it remain const?


>                                int hvm, int pae, int superpages)
>  {
>      STATE_AO_GC(dcs->ao);
>  
>      /* Convenience aliases */
>      const uint32_t domid = dcs->guest_domid;
> -    const int restore_fd = dcs->restore_fd;
>      libxl__domain_build_state *const state = &dcs->build_state;
>  
>      unsigned cbflags = libxl__srm_callout_enumcallbacks_restore



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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