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

Re: [Xen-devel] [PATCH: Lazy Restore] xl restore: Add a new "-l" lazy switch.



On Wed, 2014-06-04 at 18:12 +0530, Dushyant Behl wrote:
> On Mon, Jun 2, 2014 at 9:34 PM, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote:
> > On Thu, 2014-05-29 at 00:34 +0530, Dushyant Behl wrote:
> >> @@ -1470,6 +1470,15 @@ int xc_domain_restore(xc_interface *xch, int io_fd, 
> >> uint32_t dom,
> >>
> >>      DPRINTF("%s: starting restore of new domid %u", __func__, dom);
> >>
> >> +    if ( lazy ) {
> >
> > Coding style for libxc (see toplevel CODING_STYLE doc) has { on the next
> > line under the if.
> 
> I checked with the CODING_STYLE doc and the block structure mentioned is
> the same followed by me ( opening bracket on the same line as the statement).
> The only exception that is mentioned to have opening bracket for a block on
> a different line is a function.

Not sure which doc you are looking at, CODING_STYLE at the top of the
repo applies to tools/libxc/* and says:
        Braces ('{' and '}') are usually placed on a line of their own, except
        for the do/while loop.  This is unlike the Linux coding style and
        unlike K&R.  do/while loops are an exception. e.g.:
        
        if ( condition )
        {
            /* Do stuff. */
        }

(Note that libxl has a different style, see tools/libxl/CODING_STYLE)

> >> diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
> >> index 52f1aa9..6c8355c 100644
> >> --- a/tools/libxl/libxl_types.idl
> >> +++ b/tools/libxl/libxl_types.idl
> >> @@ -282,6 +282,7 @@ libxl_domain_create_info = 
> >> Struct("domain_create_info",[
> >>
> >>  libxl_domain_restore_params = Struct("domain_restore_params", [
> >>      ("checkpointed_stream", integer),
> >> +    ("lazy", integer),
> >
> > Changes to the libxl interface require a LIBXL_HAVE #define in libxl.h,
> > see the comment regarding API compatibility in that file.
> >
> 
> I have created a new macro LIBXL_HAVE_RESTORE_PARAMS which is
> set when the structure libxl_domain_restore_params has lazy as an attribute.

That name sounds to generic, it should be
LIBXL_HAVE_DOMAIN_RESTORE_PARAMS_LAZY I think.

Ian.


_______________________________________________
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®.