From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33061) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W120k-00058t-Ma for qemu-devel@nongnu.org; Wed, 08 Jan 2014 17:54:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W120f-0003eT-QT for qemu-devel@nongnu.org; Wed, 08 Jan 2014 17:54:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55784) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W120f-0003eO-He for qemu-devel@nongnu.org; Wed, 08 Jan 2014 17:54:01 -0500 Date: Wed, 8 Jan 2014 22:53:54 +0000 From: "Richard W.M. Jones" Message-ID: <20140108225354.GQ4802@redhat.com> References: <20140102161503.GA14565@redhat.com> <52CC13D6.6000607@redhat.com> <20140107202708.GB1273@redhat.com> <52CC6811.4000107@redhat.com> <20140107212210.GB4802@redhat.com> <52CDCD17.8070508@redhat.com> <20140108222435.GO4802@redhat.com> <52CDD513.80408@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52CDD513.80408@redhat.com> Subject: Re: [Qemu-devel] TRIM/DISCARD/UNMAP support on qemu-nbd List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Teng-Feng Yang , qemu-devel@nongnu.org On Wed, Jan 08, 2014 at 11:45:39PM +0100, Paolo Bonzini wrote: > Il 08/01/2014 23:24, Richard W.M. Jones ha scritto: > > It's extremely difficult to know when it's safe to add this parameter. > > Qemu gives no indication of when using discard=.. is safe (ie. won't > > cause qemu to fail to start up or fail in some other way). It's even > > worse when we have to go via libvirt which itself doesn't expose > > qemu's capabilities upwards. > > It is a bug that "-help" doesn't list discard=on, but QMP > query-command-line-options lists it correctly. > > libvirt could safely ignore discard if the underlying QEMU does not > support it, but that's not how it was implemented. Currently, > explicitly specifying either discard='on' and discard='off' will cause > the VM to fail to start if QEMU does not support it. There are > tradeoffs in both solutions... That sucks .. for me ... Can't we have an option like discard=ifpossible? libguestfs would use this, since we'd always prefer to honour discard requests from our kernel. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v