All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v13 02/17] qmp: Ensure consistent granularity type
Date: Mon, 16 Feb 2015 14:51:58 -0500	[thread overview]
Message-ID: <54E24A5E.7080605@redhat.com> (raw)
In-Reply-To: <54E249DE.70307@redhat.com>



On 02/16/2015 02:49 PM, Max Reitz wrote:
> On 2015-02-13 at 17:08, John Snow wrote:
>> We treat this field with a variety of different types everywhere
>> in the code. Now it's just uint32_t.
>>
>> Signed-off-by: John Snow <jsnow@redhat.com>
>> ---
>>   block.c                   | 11 ++++++-----
>>   block/mirror.c            |  4 ++--
>>   include/block/block.h     |  2 +-
>>   include/block/block_int.h |  2 +-
>>   qapi/block-core.json      |  2 +-
>>   5 files changed, 11 insertions(+), 10 deletions(-)
>
> Considering you called this series the "$MY_NAME Fixup issue", I'm
> assuming this patch is the response to something I said, maybe that
> Coverity might complain about one right-shift of a 64 bit value with the
> result stored in a 32 bit integer. If so, that would have been
> preventable by assert((x >> 9) <= INT_MAX), so it's not that you would
> have to force everything to be 32 bits wide.
>
> Anyway, I'm fine with either 32 or 64 bits (2 GB maximum granularity
> should be good for now):
>
> Reviewed-by: Max Reitz <mreitz@redhat.com>

You mentioned the types weren't /actually/ consistent, and that did 
actually bother me, so I did try to go out of my way to correct it.

I chose uint32_t to match the existing interface for granularity via the 
drive mirror command, and just whackamole'd the types until they 
flattened out.

Doing it any other way would involve changing other interface options 
elsewhere, and a 2GiB granularity should seriously be sufficient, 
considering we currently generally limit it to under 64KiB :)

  reply	other threads:[~2015-02-16 19:52 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-13 22:08 [Qemu-devel] [PATCH v13 00/17] block: incremental backup series John Snow
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 01/17] qapi: Add optional field "name" to block dirty bitmap John Snow
2015-02-16 19:58   ` Eric Blake
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 02/17] qmp: Ensure consistent granularity type John Snow
2015-02-16 19:49   ` Max Reitz
2015-02-16 19:51     ` John Snow [this message]
2015-02-16 20:03   ` Eric Blake
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 03/17] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove John Snow
2015-02-16 19:53   ` Max Reitz
2015-02-16 20:22   ` Eric Blake
2015-02-16 20:31     ` John Snow
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 04/17] block: Introduce bdrv_dirty_bitmap_granularity() John Snow
2015-02-16 19:57   ` Max Reitz
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 05/17] hbitmap: add hbitmap_merge John Snow
2015-02-20  9:34   ` Stefan Hajnoczi
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 06/17] qmp: Add block-dirty-bitmap-enable and block-dirty-bitmap-disable John Snow
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 07/17] block: Add bitmap successors John Snow
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 08/17] qmp: Add support of "dirty-bitmap" sync mode for drive-backup John Snow
2015-02-16 20:04   ` Max Reitz
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 09/17] qmp: add block-dirty-bitmap-clear John Snow
2015-02-16 20:05   ` Max Reitz
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 10/17] qapi: Add transaction support to block-dirty-bitmap operations John Snow
2015-02-16 20:28   ` Max Reitz
2015-02-16 21:33     ` John Snow
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 11/17] qmp: Add dirty bitmap status fields in query-block John Snow
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 12/17] block: add BdrvDirtyBitmap documentation John Snow
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 13/17] block: Ensure consistent bitmap function prototypes John Snow
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 14/17] iotests: add invalid input incremental backup tests John Snow
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 15/17] iotests: add simple incremental backup case John Snow
2015-02-16 20:36   ` Max Reitz
2015-02-20 10:02   ` Stefan Hajnoczi
2015-02-20 14:22     ` Max Reitz
2015-02-20 16:05     ` John Snow
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 16/17] iotests: add transactional incremental backup test John Snow
2015-02-13 22:08 ` [Qemu-devel] [PATCH v13 17/17] iotests: add incremental backup failure recovery test John Snow
2015-02-16 20:49   ` Max Reitz
2015-02-20 11:09 ` [Qemu-devel] [PATCH v13 00/17] block: incremental backup series Stefan Hajnoczi
2015-02-20 16:50   ` Kashyap Chamarthy
2015-02-20 17:20   ` John Snow
2015-02-23 17:52     ` Stefan Hajnoczi
2015-02-23 19:16       ` John Snow

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=54E24A5E.7080605@redhat.com \
    --to=jsnow@redhat.com \
    --cc=mreitz@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.