qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Amos Kong <akong@redhat.com>
To: Osier Yang <jyang@redhat.com>
Cc: libvir-list@redhat.com, whitearchey <whitearchey@gmail.com>,
	qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [libvirt] QEMU 1.6 and drive discard parameter
Date: Thu, 31 Oct 2013 16:35:43 +0800	[thread overview]
Message-ID: <20131031083543.GA7913@amosk.info> (raw)
In-Reply-To: <52720FB3.30202@redhat.com>

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.

       reply	other threads:[~2013-10-31 11:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <op.w5rdfdurcb68cn@whitewind-arch>
     [not found] ` <52720FB3.30202@redhat.com>
2013-10-31  8:35   ` Amos Kong [this message]
2013-10-31 11:17     ` [Qemu-devel] [libvirt] QEMU 1.6 and drive discard parameter Amos Kong
2013-10-21  2:15 [Qemu-devel] [PATCH 0/6] qapi: generate event defines automatically Wenchao Xia
2013-10-21  2:16 ` [Qemu-devel] [PATCH 2/6] qapi: rename MonitorEvent to QEvent Wenchao Xia
2013-11-01 14:02   ` Luiz Capitulino
2013-11-01 14:21     ` [Qemu-devel] [libvirt] QEMU 1.6 and drive discard parameter Gareth Bult

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131031083543.GA7913@amosk.info \
    --to=akong@redhat.com \
    --cc=jyang@redhat.com \
    --cc=libvir-list@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=whitearchey@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).