All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alberto Garcia <berto@igalia.com>
To: Eric Blake <eblake@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 0/3] Support streaming to an intermediate layer
Date: Sun, 22 Feb 2015 16:08:04 +0100	[thread overview]
Message-ID: <20150222150804.GA29581@igalia.com> (raw)
In-Reply-To: <54E7B9E1.80807@redhat.com>

On Fri, Feb 20, 2015 at 03:49:05PM -0700, Eric Blake wrote:

Hello and thanks for your comments.

> 1. implement QAPI introspection (we've been dreaming about this
> since qemu 1.5 days), then the caller just queries to see if the
> version of QMP has the optional 'top' parameter.

This sounds like the best option. Is there a roadmap? What's the
status?

I guess the amount of work depends a lot on the goals, but from what
I can see, something like a 'query-command-args' command that returns
the list of parameters is trivial, there's already the qmp_cmds array
in memory with all the necessary information.

> 2. implement the new feature as a new command (then the existing
> 'query-commands' becomes an easy probe; but we have code duplication
> with existing commands)

I don't think there would be a lot of code duplication because one
operation is a strict superset of the other, we would be just adding
unnecessary commands. I would go for option 1) if possible.

> 3. guarantee that we have sane error messages for bogus
> commands used as the probe. If {"execute":"block-stream",
> "data":{"device":"no-such","top":"bogus"}} gives a reliable
> DeviceNotFound error for qemu that supports optional 'top', and a
> reliable GenericError about an unknown argument 'top' in older qemu

It doesn't seem like the best solution considering the alternatives,
but for what it's worth:

Current QEMU:

(QEMU) block-stream device=no-such top=bogus
{u'error': {u'class': u'GenericError', u'desc': u"Invalid parameter 'top'"}}

With my patch:

(QEMU) block-stream device=no-such top=bogus
{u'error': {u'class': u'DeviceNotFound', u'desc': u"Device 'no-such' not found"}}

Regards,

Berto

      reply	other threads:[~2015-02-22 15:08 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-20 13:53 [Qemu-devel] [PATCH 0/3] Support streaming to an intermediate layer Alberto Garcia
2015-02-20 13:53 ` [Qemu-devel] [PATCH 1/3] block: " Alberto Garcia
2015-03-05 14:04   ` Kevin Wolf
2015-03-05 14:58     ` Alberto Garcia
2015-03-05 15:15       ` Kevin Wolf
2015-03-05 15:47         ` Alberto Garcia
2015-03-12 13:18     ` Alberto Garcia
2015-02-20 13:53 ` [Qemu-devel] [PATCH 2/3] block: Add QMP support for " Alberto Garcia
2015-02-20 22:38   ` Eric Blake
2015-02-23 12:23     ` Alberto Garcia
2015-02-23 13:04       ` Kevin Wolf
2015-02-24 14:08         ` Markus Armbruster
2015-03-05 14:09   ` Kevin Wolf
2015-03-05 15:12     ` Alberto Garcia
2015-03-11 16:38     ` Alberto Garcia
2015-03-12 15:45       ` Kevin Wolf
2015-03-17 15:00         ` Alberto Garcia
2015-03-17 15:22           ` Eric Blake
2015-03-17 15:40             ` Alberto Garcia
2015-03-17 15:28           ` Kevin Wolf
2015-03-18 12:29         ` Alberto Garcia
2015-02-20 13:53 ` [Qemu-devel] [PATCH 3/3] docs: Document how to stream " Alberto Garcia
2015-02-20 17:34 ` [Qemu-devel] [PATCH 0/3] Support streaming " Eric Blake
2015-02-20 19:05   ` Alberto Garcia
2015-02-20 22:49     ` Eric Blake
2015-02-22 15:08       ` Alberto Garcia [this message]

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=20150222150804.GA29581@igalia.com \
    --to=berto@igalia.com \
    --cc=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.