From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [PATCH v6] libxl: add option for discard support to xl disk configuration Date: Tue, 17 Jun 2014 10:45:39 +0200 Message-ID: <20140617084539.GA6558@aepfle.de> References: <1400493019-18114-1-git-send-email-olaf@aepfle.de> <21369.61499.949523.549356@mariner.uk.xensource.com> <1402936023.23566.14.camel@kazak.uk.xensource.com> <20140617063635.GA10777@aepfle.de> <1402993646.16844.5.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: <1402993646.16844.5.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: stefano.stabellini@eu.citrix.com, Ian Jackson , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Tue, Jun 17, Ian Campbell wrote: > On Tue, 2014-06-17 at 08:36 +0200, Olaf Hering wrote: > > +++ b/tools/libxl/libxl.c > > @@ -2292,6 +2292,9 @@ int libxl__device_disk_setdefault(libxl__gc *gc, libxl_device_disk *disk) > > { > > int rc; > > > > + if (!libxl_defbool_is_default(disk->discard_enable)) > > + libxl_defbool_setdefault(&disk->discard_enable, !!disk->readwrite); > No need for the condition here, setdefault already incorporates it. > > I think with that changed this is probably the right fix. I sent an fix: 'libxl: properly set default of discard_enable'. Olaf