From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53679) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vbq1X-0004Qp-Hk for qemu-devel@nongnu.org; Thu, 31 Oct 2013 07:02:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vbq1N-0002oP-U5 for qemu-devel@nongnu.org; Thu, 31 Oct 2013 07:02:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44687) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbnjI-0000O8-Mc for qemu-devel@nongnu.org; Thu, 31 Oct 2013 04:35:48 -0400 Date: Thu, 31 Oct 2013 16:35:43 +0800 From: Amos Kong Message-ID: <20131031083543.GA7913@amosk.info> References: <52720FB3.30202@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52720FB3.30202@redhat.com> 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: Osier Yang Cc: libvir-list@redhat.com, whitearchey , qemu-devel 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. > Regards, > Osier -- Amos.