From: Ian Jackson Subject: Re: [PATCH V5 29/32] xl: use "libxl-json" format Date: Tue, 20 May 2014 16:39:42 +0100 Message-ID: <21371.30526.738503.170343@mariner.uk.xensource.com> References: <1400018054-26038-1-git-send-email-wei.liu2@citrix.com> <1400018054-26038-30-git-send-email-wei.liu2@citrix.com> <21371.28848.76400.435942@mariner.uk.xensource.com> <1400598908.6946.98.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1400598908.6946.98.camel@kazak.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 Campbell Cc: Wei Liu , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Ian Campbell writes ("Re: [PATCH V5 29/32] xl: use "libxl-json" format"): > On Tue, 2014-05-20 at 16:11 +0100, Ian Jackson wrote: > > Firstly, I think this editing of libxl's copy of domain config way is > > a layering violation. > > > > But it ought to be unnecessary, because either libxl_domain_rename > > That would lend credence to the idea that these functions ought to be > internal to the library, or at least the store one should (get is still > useful to applications I suppose, e.g. xl list). Indeed. > > or "libxl_load_domain_configuration" should deal with it. I would > > much prefer the latter, as that results in the domain name being > > stored only in one place. > > You mean libxl_load_dmoain_config should have special handling for > domains names ending --incoming (or --.* perhaps)? That doesn't seem > right, I suspect you meant something else. No, that's not what I mean. I mean that libxl_load_domain_config[1] should obtain the actual domain name from xenstore, the same way that libxl_domid_to_name does, and put it into the retreived configuration. Ian. [1] should probably be called libxl_get_domain_config or something like that, because "load" might suggest "loading" the config into the system to make it effective.