All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Justin Ossevoort <justin@quarantainenet.nl>,
	qemu-devel@nongnu.org, Michael Roth <mdroth@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH] qga/commands-posix: Fix bug in guest-fstrim
Date: Wed, 01 Apr 2015 06:33:06 -0600	[thread overview]
Message-ID: <551BE582.1070409@redhat.com> (raw)
In-Reply-To: <551BA42F.8060104@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1341 bytes --]

On 04/01/2015 01:54 AM, Paolo Bonzini wrote:
> 
> 
> On 31/03/2015 19:03, Eric Blake wrote:
>>>>
>>>> Apart from this, looks good.
>> Changing a "return":{} to "return":0 is not backwards-compatible.
> 
> Why not?

It's only a minor incompatibility, but a client that hard-codes itself
to parsing "returns":0 (that is, expecting a json-number) will fail when
talking to an older qemu that provided a json-object instead; while a
client that expects a json-object always and can search for a "key":0
integer pair within that object that may or may not be present (we
already document that clients MUST be prepared for dictionary members to
be optional, but do NOT advise that clients must be prepared for a
change between fundamental JSON types).  Yes, the
backwards-incompatibility is a weak argument, but as my pending series
will be requiring all new commands to whitelist a non-dict return, we
might as well avoid making this another case for that whitelist.

My stronger argument in my other email is that returning a single
integer is not much information.  Since we have FULL statistics (how
much did each file system trim), why not return it all, for the end user
to take advantage of if desired?

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2015-04-01 12:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-31 15:14 [Qemu-devel] [PATCH] qga/commands-posix: Fix bug in guest-fstrim Justin Ossevoort
2015-03-31 16:52 ` Paolo Bonzini
2015-03-31 17:03   ` Eric Blake
2015-04-01  7:54     ` Paolo Bonzini
2015-04-01 12:33       ` Eric Blake [this message]
2015-04-01 16:49         ` Paolo Bonzini
2015-04-02  7:37           ` Justin Ossevoort
2015-03-31 17:01 ` Eric Blake

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=551BE582.1070409@redhat.com \
    --to=eblake@redhat.com \
    --cc=justin@quarantainenet.nl \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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.