From: Wei Liu Subject: Re: [PATCH v3 4/4] libxl: add support for vscsi Date: Mon, 9 Mar 2015 16:46:04 +0000 Message-ID: <20150309164603.GW18491@zion.uk.xensource.com> References: <1425635156-2357-1-git-send-email-olaf@aepfle.de> <1425635156-2357-5-git-send-email-olaf@aepfle.de> <20150306143125.GX12103@zion.uk.xensource.com> <20150309160831.GA1755@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20150309160831.GA1755@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Olaf Hering Cc: Ian Jackson , Stefano Stabellini , Wei Liu , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Mon, Mar 09, 2015 at 05:08:31PM +0100, Olaf Hering wrote: > On Fri, Mar 06, Wei Liu wrote: > > > > +void libxl__device_vscsi_add(libxl__egc *egc, uint32_t domid, > > > + libxl_device_vscsi *vscsi, > > > + libxl__ao_device *aodev) > > You need to update this domain's JSON configuration. Cf. > > libxl__device_vtpm_add and friends. Also look at libxl_internal.h L2310. > > Its not clear to me why every libxl__device__add copies the passed > in libxl_device_ into a local named _saved. Why is it not > enough to work directly with the input? Its not obvious what the purpose > of that copy is, nothing seems to alter the input. > The input might be altered in the hotplug function, see libxl__device__setdefault functions. We want to save the original one. However the save need to happen later, so we need to copy the original input and save that copy if necessary. Wei. > Olaf