* Re: [Qemu-devel] [libvirt] QEMU 1.6 and drive discard parameter
[not found] ` <52720FB3.30202@redhat.com>
@ 2013-10-31 8:35 ` Amos Kong
2013-10-31 11:17 ` Amos Kong
0 siblings, 1 reply; 3+ messages in thread
From: Amos Kong @ 2013-10-31 8:35 UTC (permalink / raw)
To: Osier Yang; +Cc: libvir-list, 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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [libvirt] QEMU 1.6 and drive discard parameter
2013-10-31 8:35 ` [Qemu-devel] [libvirt] QEMU 1.6 and drive discard parameter Amos Kong
@ 2013-10-31 11:17 ` Amos Kong
0 siblings, 0 replies; 3+ messages in thread
From: Amos Kong @ 2013-10-31 11:17 UTC (permalink / raw)
To: Osier Yang
Cc: Kevin Wolf, libvir-list, whitearchey, qemu-devel, Paolo Bonzini
CC Kevin, Paolo
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.
Currently we have three QemuOptsList (qemu_common_drive_opts,
qemu_legacy_drive_opts, and qemu_drive_opts)
only qemu_drive_opts is added to vm_config_groups[]
| commit 492fdc6fbe17b2d45878e813e980f782ac260c30
| Author: Kevin Wolf <kwolf@redhat.com>
| Date: Wed Jun 19 13:44:17 2013 +0200
|
| Revert "block: Disable driver-specific options for 1.5"
This patch removed the items in qemu_drive_opts .desc
We query commandline options by checking information in vm_config_groups[],
so we can only get a NULL parameter list now.
Another issue is we also can't query legacy options of -drive.
--
Can we fix this problem by copy desc items of qemu_legacy_drive_opts and
qemu_common_drive_opts to qemu_drive_opts?
--
Amos.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [libvirt] QEMU 1.6 and drive discard parameter
2013-11-01 14:02 ` Luiz Capitulino
@ 2013-11-01 14:21 ` Gareth Bult
0 siblings, 0 replies; 3+ messages in thread
From: Gareth Bult @ 2013-11-01 14:21 UTC (permalink / raw)
To: qemu-devel
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-11-01 14:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <op.w5rdfdurcb68cn@whitewind-arch>
[not found] ` <52720FB3.30202@redhat.com>
2013-10-31 8:35 ` [Qemu-devel] [libvirt] QEMU 1.6 and drive discard parameter Amos Kong
2013-10-31 11:17 ` 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
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).