From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50503) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W19dV-00041x-Cu for qemu-devel@nongnu.org; Thu, 09 Jan 2014 02:02:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W19dM-0005IE-Vp for qemu-devel@nongnu.org; Thu, 09 Jan 2014 02:02:37 -0500 Received: from mail-ea0-x22a.google.com ([2a00:1450:4013:c01::22a]:53418) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W19dM-0005HG-Pr for qemu-devel@nongnu.org; Thu, 09 Jan 2014 02:02:28 -0500 Received: by mail-ea0-f170.google.com with SMTP id k10so1259782eaj.1 for ; Wed, 08 Jan 2014 23:02:28 -0800 (PST) Sender: Paolo Bonzini Message-ID: <52CE497F.7020808@redhat.com> Date: Thu, 09 Jan 2014 08:02:23 +0100 From: Paolo Bonzini MIME-Version: 1.0 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> <20140108225354.GQ4802@redhat.com> In-Reply-To: <20140108225354.GQ4802@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] TRIM/DISCARD/UNMAP support on qemu-nbd List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Richard W.M. Jones" Cc: Teng-Feng Yang , qemu-devel@nongnu.org Il 08/01/2014 23:53, Richard W.M. Jones ha scritto: > 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. That would be a libvirt option, not QEMU. Paolo