All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kamala Narasimhan <kamala.narasimhan@gmail.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [RFC] xl disk configuration handling
Date: Mon, 31 Jan 2011 15:39:05 -0500	[thread overview]
Message-ID: <4D471DE9.9050709@gmail.com> (raw)
In-Reply-To: <1296501957.20804.198.camel@localhost.localdomain>

Ian Campbell wrote:
> On Mon, 2011-01-31 at 17:18 +0000, Stefano Stabellini wrote: 
>> I agree that libxl_disk_phystype expresses both the format and the
>> backend type in a single confusing way, so there should be two enums:
>> one for the format (libxl_disk_format) and one for the backend type
>> (libxl_disk_pdev_type).
> 
> pdev_type doesn't seem like a very good name for "backend type" (and it
> is unnecessarily abbreviated which I personally dislike, especially in
> public interfaces).
> 
> Would libxl_disk_backend_type work?
>
Yes, I will go with libxl_disk_backend_type.

>>> diff -r 52e928af3637 tools/libxl/libxl.c
>>> --- a/tools/libxl/libxl.c     Fri Jan 28 19:37:49 2011 +0000
>>> +++ b/tools/libxl/libxl.c     Sun Jan 30 11:47:22 2011 -0500
>>> @@ -588,7 +588,7 @@ int libxl_wait_for_disk_ejects(libxl_ctx
>>>      for (i = 0; i < num_disks; i++) {
>>>          if (asprintf(&(waiter[i].path), "%s/device/vbd/%d/eject",
>>>                       libxl__xs_get_dompath(&gc, domid),
>>> -                     libxl__device_disk_dev_number(disks[i].virtpath)) < 0)
>>> +                     libxl__device_disk_dev_number(disks[i].vdev_path)) < 0)
>>>              goto out;
>>>          if (asprintf(&(waiter[i].token), "%d", LIBXL_EVENT_DISK_EJECT) < 0)
>>>              goto out;
>> it would be nice if all the renaming was done in a separate patch so
>> that the real changes are easier to read
> 
> Aren't the renamings a bit cosmetic anyway, i.e. could/should be left
> for 4.2? I guess I can see the argument of changing the field name if
> the type name changes, assuming the type names are well chosen.
> 
I did consider keeping away from such renaming but then I figured I might as
well if I am going to make other changes to the interface.

> The virtpath->vdev_path rename in particular seems odd. The main thing
> which is wrong with virtpath is that the thing it contains is a vdev
> which doesn't really have any path-like properties, but we retain the
> path part in the new name. If it's renamed to anything I reckon it
> should just be vdev.
That makes sense.  I will rename it to just vdev.

Kamala

  reply	other threads:[~2011-01-31 20:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-30 17:46 [RFC] xl disk configuration handling Kamala Narasimhan
2011-01-31 17:18 ` Stefano Stabellini
2011-01-31 19:25   ` Ian Campbell
2011-01-31 20:39     ` Kamala Narasimhan [this message]
2011-01-31 20:19   ` Kamala Narasimhan
2011-02-01 11:13     ` Stefano Stabellini
2011-02-01 14:00       ` Kamala Narasimhan

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=4D471DE9.9050709@gmail.com \
    --to=kamala.narasimhan@gmail.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=stefano.stabellini@eu.citrix.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.