From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35578) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VcFQc-0006e3-Mm for qemu-devel@nongnu.org; Fri, 01 Nov 2013 10:10:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VcFQR-0000mh-4V for qemu-devel@nongnu.org; Fri, 01 Nov 2013 10:10:22 -0400 Received: from ns1.linux.co.uk ([193.111.185.7]:58372) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VcFQQ-0000AL-Ri for qemu-devel@nongnu.org; Fri, 01 Nov 2013 10:10:11 -0400 Received: from ns1.linux.co.uk (localhost [127.0.0.1]) by ns1.linux.co.uk (Postfix) with ESMTP id B7C3E6133B for ; Fri, 1 Nov 2013 14:22:08 +0000 (GMT) Received: from mail.linux.co.uk (mail.linux.co.uk [193.111.185.15]) by ns1.linux.co.uk (Postfix) with ESMTP id D17C06133B for ; Fri, 1 Nov 2013 14:22:02 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by mail.linux.co.uk (Postfix) with ESMTP id 021556A000F for ; Fri, 1 Nov 2013 14:21:46 +0000 (GMT) Received: from mail.linux.co.uk ([127.0.0.1]) by localhost (mail.linux.co.uk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 49lBxzUtT0ZN for ; Fri, 1 Nov 2013 14:21:43 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by mail.linux.co.uk (Postfix) with ESMTP id 32A7C6A0646 for ; Fri, 1 Nov 2013 14:21:43 +0000 (GMT) Received: from mail.linux.co.uk ([127.0.0.1]) by localhost (mail.linux.co.uk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id g72jJ5HrBnxb for ; Fri, 1 Nov 2013 14:21:40 +0000 (GMT) Received: from mail.linux.co.uk (mail.linux.co.uk [193.111.185.15]) by mail.linux.co.uk (Postfix) with ESMTP id 9122B6A000E for ; Fri, 1 Nov 2013 14:21:40 +0000 (GMT) Date: Fri, 1 Nov 2013 14:21:38 +0000 (GMT) From: Gareth Bult Message-ID: <592036863.6673.1383315698497.JavaMail.root@mail.linux.co.uk> In-Reply-To: <20131101100231.5c2aa5a5@redhat.com> References: <1382321765-29052-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1382321765-29052-3-git-send-email-xiawenc@linux.vnet.ibm.com> <20131101100231.5c2aa5a5@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [libvirt] QEMU 1.6 and drive discard parameter List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hey guys, I've just rolled out Qemu 1.6 to fix problems I've been having, which worked fine .. but I've now lost discard support which is a problem. Is there an easy / quick fix for this without digging through other people's code? I'm happy to compile up whatever is necessary, I just need the "discard" option to work for Libvirt / Qemu 1.6 ... tia Gareth. On Thu, Oct 31, 2013 at 04:35:43PM +0800, Amos Kong wrote: > On Thu, Oct 31, 2013 at 04:07:15PM +0800, Osier Yang wrote: > > CC to Amos. > > > > On 30/10/13 16:19, whitearchey wrote: > > > > > >In QEMU 1.6 parameters of 'drive' option were removed: > > > > > >QemuOptsList qemu_drive_opts = { > > > .name = "drive", > > > .head = QTAILQ_HEAD_INITIALIZER(qemu_drive_opts.head), > > > .desc = { > > > /* > > > * no elements => accept any params > > > * validation will happen later > > > */ > > > { /* end of list */ } > > > }, > > >}; > > > > > >But libvirt still checks for QEMU_CAPS_DRIVE_DISCARD using QMP > > >query-command-line-options: > > > > > >static struct virQEMUCapsCommandLineProps virQEMUCapsCommandLine[] = { > > > { "machine", "mem-merge", QEMU_CAPS_MEM_MERGE }, > > > { "drive", "discard", QEMU_CAPS_DRIVE_DISCARD }, > > > { "realtime", "mlock", QEMU_CAPS_MLOCK }, > > >}; > > >... > > >qemuMonitorGetCommandLineOptionParameters(mon, > > >virQEMUCapsCommandLine[i].option, &values) > > > > > >So, when I try to use discard option in domain xml I get this error: > > > > > >error : qemuBuildDriveStr:3986 : unsupported configuration: > > >discard is not supported by this QEMU binary > > > > > > > It's a qemu problem, the command "query-command-line-options" should > > keep working > > after the structures were changed for any option, in this case, all > > the option descs were > > moved to "qemu_common_drive_opts" instead. > > { 'execute': 'query-command-line-options', 'arguments': { 'option': 'drive' } > } > > { > "return": [ > { > "parameters": [ > ], > "option": "drive" > } > ] > } > > It returns a NULL parameters list, that's true, some error handling > should be done by libvirt.