From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v5 6/8] libxl: introduce libxl__alloc_vdev Date: Fri, 4 May 2012 18:08:23 +0100 Message-ID: <1336151303.3735.3.camel@dagon.hellion.org.uk> References: <1336130000-27261-6-git-send-email-stefano.stabellini@eu.citrix.com> <1336143599.7535.17.camel@zakaz.uk.xensource.com> <20388.2028.216374.311465@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20388.2028.216374.311465@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: "xen-devel@lists.xensource.com" , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Fri, 2012-05-04 at 17:46 +0100, Ian Jackson wrote: > Ian Campbell writes ("Re: [PATCH v5 6/8] libxl: introduce libxl__alloc_vdev"): > > On Fri, 2012-05-04 at 12:13 +0100, Stefano Stabellini wrote: > > > Introduce libxl__alloc_vdev: find a spare virtual block device in the > > > domain passed as argument. > ... > > > + libxl__device_disk_dev_number(blkdev_start, &disk, &part); > > > > If you specify the default blkdev_start in xl as d0 instead of xvda > > doesn't at least this bit magically become portable to BSD etc too? > > This bit is portable already. It's specified in terms of the guest > device name rather than the host device name. This may be confusing > but it saves on having a converter for host device names to disk > numbers. Right. I think I really should have made this comment on the previous patch, What I was trying to suggest is that using the Linux specific "xvda" in the example in the config file and as the default (as patch 5/8 does) is not portable, even though the infrastructure itself is quite capable of dealing with the portable alternatives -- IOW using "d0" both in the example and in the actual default would make xl be automatically portable without other patches (libxl still needs a patch for the BSD libxl__devid_to_localdev but that's it). > > Or couldn't it actually be an int and save you parsing at all? > > In general it's surely more friendly to allow the user to specify this > with a name, like we do with vdevs elsewhere. That seems reasonable. Ian.