From: Stefano Stabellini Subject: Re: [PATCH v6 02/11] libxl: libxl__device_disk_local_attach return a new libxl_device_disk Date: Mon, 21 May 2012 17:34:30 +0100 Message-ID: References: <1337350125-30394-2-git-send-email-stefano.stabellini@eu.citrix.com> <20406.24010.290055.700640@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20406.24010.290055.700640@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" , Ian Campbell , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Fri, 18 May 2012, Ian Jackson wrote: > Stefano Stabellini writes ("[PATCH v6 02/11] libxl: libxl__device_disk_local_attach return a new libxl_device_disk"): > > Introduce a new libxl_device_disk* parameter to > > libxl__device_disk_local_attach, the parameter is allocated by the > > caller. libxl__device_disk_local_attach is going to fill the new disk > > with informations about the new locally attached disk. The new > > libxl_device_disk should be passed to libxl_device_disk_local_detach > > afterwards. > > In this declaration: > > > @@ -1767,6 +1768,7 @@ struct libxl__bootloader_state { > > libxl__bootloader_console_callback *console_available; > > libxl_domain_build_info *info; /* u.pv.{kernel,ramdisk,cmdline} updated */ > > libxl_device_disk *disk; > > + libxl_device_disk tmpdisk; > > uint32_t domid; > > We need information about what this "tmpdisk" is. All of the other > parameters here are input parameters, except as otherwise noted in the > comment. > > Also I'm not convinced that "tmpdisk" is quite the right name. You > also need to explain the distinction between "disk" and "tmpdisk". > > Perhaps: > > const libxl_device_disk *disk; /* as specified by user */ > libxl_device_disk localdisk; > /* Should be zeroed by caller on entry. Will be filled in by > * bootloader machinery; represents the local attachment of the > * disk for the benefit of the bootloader. Must be detached by > * the caller using libxl__device_disk_local_detach, but only > * after the domain's kernel and initramfs have been loaded into > * memory and the file references disposed of. */ > > ? fine by me