All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Jackson <Ian.Jackson@eu.citrix.com>
To: Kamala Narasimhan <kamala.narasimhan@gmail.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH 2/5] Xl interface change plus changes to code it impacts
Date: Tue, 8 Feb 2011 15:42:57 +0000	[thread overview]
Message-ID: <19793.25729.936107.227868@mariner.uk.xensource.com> (raw)
In-Reply-To: <4D50628A.2000307@gmail.com>

Kamala Narasimhan writes ("[xen-devel][PATCH 2/5] Xl interface change plus changes to code it impacts"):
> Attached are the changes made to xl disk related interface per earlier discussion.  Please let me know if there are further comments/issues to fix.

Thanks.  I have some comments of my own:

> +char *libxl__device_disk_string_of_backend(libxl_disk_backend backend)
...
> +    switch (backend) {
> +        case DISK_BACKEND_QEMU: return "qdisk";
> +        case DISK_BACKEND_TAPDISK2: return "tap";
> +        case DISK_BACKEND_BLKBACK: return "phy";

Perhaps the backend type number constants should be _QDISK, _TAP,
_PHY ?  I think a function like _string_of should be a simple mapping
to return the string version of the same name, not also change the
name.

> -            if (libxl__blktap_enabled(&gc))
> +            if ( libxl__blktap_enabled(&gc) && 
> +                 disk->format != DISK_BACKEND_QEMU )

Don't add whitespace inside the if's ( ).  (You have done this in
several places.  I know that libxl isn't entirely consistent but
we have a defined coding style shouldn't be making the code less
consistent.)

> diff -r e4406b9fb064 tools/libxl/xl_cmdimpl.c
> --- a/tools/libxl/xl_cmdimpl.c	Mon Feb 07 15:04:32 2011 +0000
> +++ b/tools/libxl/xl_cmdimpl.c	Mon Feb 07 11:28:10 2011 -0500
> @@ -361,9 +361,9 @@ static void printf_info(int domid,
>          printf("\t\t(tap\n");
>          printf("\t\t\t(backend_domid %d)\n", d_config->disks[i].backend_domid);
>          printf("\t\t\t(domid %d)\n", d_config->disks[i].domid);
> -        printf("\t\t\t(physpath %s)\n", d_config->disks[i].physpath);
> -        printf("\t\t\t(phystype %d)\n", d_config->disks[i].phystype);
> -        printf("\t\t\t(virtpath %s)\n", d_config->disks[i].virtpath);
> +        printf("\t\t\t(pdev_path %s)\n", d_config->disks[i].pdev_path);
> +        printf("\t\t\t(backend %d)\n", d_config->disks[i].backend);
> +        printf("\t\t\t(vdev %s)\n", d_config->disks[i].vdev);

This part of the code is providing information which is intended to be
parsed by callers which were written to cope with the output from xm.
For backward compatibility, the previously used names and values
should be output with the previously used semantics; it is OK to add
new ones too with more sane semantics.

I think it's also acceptable to be a bit approximate with the
emulation, but simply removing the old names is not correct.

Ian.

  parent reply	other threads:[~2011-02-08 15:42 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-07 21:22 [PATCH 2/5] Xl interface change plus changes to code it impacts Kamala Narasimhan
2011-02-08 14:38 ` Ian Campbell
2011-02-08 14:41   ` Ian Campbell
2011-02-08 18:42     ` Kamala Narasimhan
2011-02-10  9:02       ` Ian Campbell
2011-02-10 14:37         ` Kamala Narasimhan
2011-02-08 18:37   ` Kamala Narasimhan
2011-02-08 15:42 ` Ian Jackson [this message]
2011-02-08 18:56   ` Kamala Narasimhan
2011-02-08 16:42 ` Stefano Stabellini
2011-02-08 19:04   ` Kamala Narasimhan
2011-02-08 19:09     ` Stefano Stabellini
  -- strict thread matches above, loose matches on Subject: below --
2011-02-07 21:15 [PATCH 0/5] xl disk configuration handling Kamala Narasimhan
2011-02-09 18:21 ` [PATCH 2/5] Xl interface change plus changes to code it impacts Kamala Narasimhan
2011-02-10  9:23   ` Ian Campbell
2011-02-10 14:44     ` Kamala Narasimhan
2011-02-10 11:50   ` Stefano Stabellini
2011-02-10 17:05     ` Kamala Narasimhan
2011-02-10 20:00       ` Kamala Narasimhan
2011-02-11 13:47         ` Stefano Stabellini
2011-02-11 14:45           ` Kamala Narasimhan
2011-02-11 15:19           ` Kamala Narasimhan
2011-02-11 15:26             ` Stefano Stabellini
2011-02-11 19:12             ` Kamala Narasimhan
2011-02-14 17:45               ` Ian Jackson
2011-02-14 18:30                 ` Kamala Narasimhan
2011-02-14 19:51                 ` Kamala Narasimhan
2011-02-15 19:22                   ` Ian Jackson
2011-02-15 19:38                     ` Kamala Narasimhan
2011-02-15 19:41                       ` 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=19793.25729.936107.227868@mariner.uk.xensource.com \
    --to=ian.jackson@eu.citrix.com \
    --cc=kamala.narasimhan@gmail.com \
    --cc=xen-devel@lists.xensource.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.