From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: [PATCH 3/3] libxl: libxl__device_from_disk should retrieve backend from xenstore Date: Fri, 6 Mar 2015 13:04:45 +0000 Message-ID: <20150306130445.GR12103@zion.uk.xensource.com> References: <1423488068-31268-1-git-send-email-wei.liu2@citrix.com> <1423488068-31268-4-git-send-email-wei.liu2@citrix.com> <21721.58650.576986.983371@mariner.uk.xensource.com> <20150210114950.GF27856@zion.uk.xensource.com> <54DB8EDA.7010603@suse.com> <20150223151325.GA20083@zion.uk.xensource.com> <54EFB101.2030409@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <54EFB101.2030409@suse.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: Jim Fehlig Cc: Ian Jackson , Wei Liu , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Sorry for the late reply. On Thu, Feb 26, 2015 at 04:49:21PM -0700, Jim Fehlig wrote: > Wei Liu wrote: > > On Wed, Feb 11, 2015 at 10:18:18AM -0700, Jim Fehlig wrote: > > > >> At minimum, libvirt will populate the pdev_path, vdev, backend, and > >> format fields. If backend and format (which, in libvirt-speack > >> correspond to the 'name' and 'type' attributes on the optional > >> element) are not specified, they are set to LIBXL_DISK_BACKEND_UNKNOWN > >> and LIBXL_DISK_FORMAT_RAW respectively. > >> > >> > > > > Since libvirt has a tendency of specifying everything, how come there is > > no "name" and "type" in ? > > The element is optional. From > http://libvirt.org/formatdomain.html#elementsDisks > > "|driver: |The optional driver element allows specifying further details > related to the hypervisor driver used to provide the disk" > > And when not specified, Ian C. recommended allowing libxl to pick > suitable defaults > > https://www.redhat.com/archives/libvir-list/2013-February/msg01126.html > > > Can we actually generate all the > > > > fields needed when attaching a disk and store in libvirt's diskspec? > > Yes, it was this way before the suggested change. > I'm now of the opinion that we shouldn't change libxl__device_from_disk to fill in specific information, otherwise it becomes a special case for all the libxl__device_from_$foo functions. And from the information you provide above it seems to be easily fixable on libvirt side -- you have all the information at hand when attaching the disk, so why not just store it for reuse later? Ian C, what do you think? Wei. > Regards, > Jim