From: Wei Liu Subject: Re: [PATCH V5 29/32] xl: use "libxl-json" format Date: Tue, 3 Jun 2014 11:02:04 +0100 Message-ID: <20140603100204.GG6043@zion.uk.xensource.com> References: <1400018054-26038-1-git-send-email-wei.liu2@citrix.com> <1400018054-26038-30-git-send-email-wei.liu2@citrix.com> <1400595806.6946.85.camel@kazak.uk.xensource.com> <20140601193718.GG25584@zion.uk.xensource.com> <1401726623.8841.22.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1401726623.8841.22.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: ian.jackson@eu.citrix.com, Wei Liu , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Mon, Jun 02, 2014 at 05:30:23PM +0100, Ian Campbell wrote: > On Sun, 2014-06-01 at 20:37 +0100, Wei Liu wrote: > > On Tue, May 20, 2014 at 03:23:26PM +0100, Ian Campbell wrote: > > [...] > > > > @@ -1787,13 +1770,10 @@ static int handle_domain_death(uint32_t *r_domid, > > > > break; > > > > > > > > case LIBXL_ACTION_ON_SHUTDOWN_RESTART_RENAME: > > > > - reload_domain_config(*r_domid, config_data, config_len); > > > > restart = 2; > > > > break; > > > > > > > > case LIBXL_ACTION_ON_SHUTDOWN_RESTART: > > > > - reload_domain_config(*r_domid, config_data, config_len); > > > > > > Why is it not equally necessary to reload the JSON config at this point > > > if it exists? > > > > > > > Because domain configuration is loaded in the caller of > > handle_domain_death now. > > OK. Is there any way that could be refactored into a separate patch to > make this one simpler to reason about? > The purpose of reload_domain_config is to load the "xl" file (in fact the saved domain config) from libxl private data store. After we have our API to retrieve domain configuration in libxl I don't see the need for it anymore. And this change needs to come with the introduction of "libxl-json" file, a separate change is not very feasible IMHO. Wei.