From: Ian Campbell Subject: Re: [PATCH] [RFC] qemu-upstream: add discard support for xen_disk Date: Fri, 17 Jan 2014 15:43:50 +0000 Message-ID: <1389973430.6697.120.camel@kazak.uk.xensource.com> References: <1389304875-4311-1-git-send-email-olaf@aepfle.de> <20140117152930.GA13324@aepfle.de> <20140117153820.GA17569@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20140117153820.GA17569@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: xen-devel@lists.xen.org, Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Fri, 2014-01-17 at 16:38 +0100, Olaf Hering wrote: > On Fri, Jan 17, Stefano Stabellini wrote: > > > On Fri, 17 Jan 2014, Olaf Hering wrote: > > > On Fri, Jan 17, Stefano Stabellini wrote: > > > > > > > On Thu, 9 Jan 2014, Olaf Hering wrote: > > > > > The discard support is enabled unconditionally. But it would be worth to > > > > > have a knob to disable it in case the backing file was intentionally > > > > > created non-sparse to avoid fragmentation. > > > > > How could this be knob be passed from domU.cfg:disk=[] to the actual > > > > > qemu process? > > > > > > > > It would need to be on xenstore, because that is the only per-disk > > > > interface xen_disk is listening to. > > > > > > I figured that out. There are already script=, backend= and other knobs. > > > I will see how to add a discard=on|off to libxl and write that to the > > > xenstore backend node so qemu can get it from there. > > > What property name do you suggest? I have something like > > > "toolstack-option-discard" in mind. > > > > discard_enabled? > > Isnt that name too generic? In the end that node is used also by backend > and frontend. Surely this node is for toolstack to qdisk communication. It is then up to itself qdisk to decide whether to expose this feature to the frontend, using the existing defined feature flag for that purpose. Ian.