From: Ian Campbell Subject: Re: [PATCH v4 6/8] libxl: introduce libxl__alloc_vdev Date: Tue, 24 Apr 2012 16:04:36 +0100 Message-ID: <1335279876.4347.195.camel@zakaz.uk.xensource.com> References: <1335264358-20182-6-git-send-email-stefano.stabellini@eu.citrix.com> <20374.49036.91434.25461@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20374.49036.91434.25461@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 Tue, 2012-04-24 at 15:58 +0100, Ian Jackson wrote: > Stefano Stabellini writes ("[Xen-devel] [PATCH v4 6/8] libxl: introduce libxl__alloc_vdev"): > > Introduce libxl__alloc_vdev: find a spare virtual block device in the > > domain passed as argument. > ... > > +static char * libxl__alloc_vdev(libxl__gc *gc, uint32_t domid, > > + char *blkdev_start, xs_transaction_t t) > > +{ > > If this function is ever called with domid != our own, this will > malfunction, because ... > > > + if (errno == ENOENT) > > + return libxl__devid_to_localdev(gc, devid); > > ... libxl__devid_to_localdev only answers the question about the > current domain. > > This needs to be mentioned in a documentation comment by the function, > at the very least. Does your series invoke it with a domid other than > our own ? > > > + else > > + return NULL; > > + } > > + vdev[strlen(vdev) - 1]++; > > + } while (vdev[strlen(vdev) - 1] <= 'z'); > > There is a scaling limit here of not starting more than 26 domains > simultaneously. Is that acceptable ? I'm tempted to suggest not. While I agree we also need to start being pragmatic about ever getting 4.2 out the door... If it's a trivial job to support aa, ab etc then lets do it, if not then lets leave it for 4.3? > Note that "simultaneously" includes the case where all 27 of them are > simply sat waiting for someone to press "return" on a pygrub prompt. > > Ian.