From: Kevin Wolf <kwolf@redhat.com>
To: Piotr Sarna <sarna@skytechnology.pl>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, famz@redhat.com,
mreitz@redhat.com
Subject: Re: [Qemu-devel] [PATCH v3] block: unify blocksize types
Date: Fri, 9 Feb 2018 16:12:01 +0100 [thread overview]
Message-ID: <20180209151201.GI3998@localhost.localdomain> (raw)
In-Reply-To: <1518172615-1260-1-git-send-email-sarna@skytechnology.pl>
Am 09.02.2018 um 11:36 hat Piotr Sarna geschrieben:
> BlockSizes structure used in block size probing has uint32_t types
> for logical and physical sizes. These fields are wrongfully assigned
> to uint16_t in BlockConf, which results, among other errors,
> in assigning 0 instead of 65536 (which will be the case in at least
> future LizardFS block device driver among other things).
>
> This commit makes BlockConf's physical_block_size and logical_block_size
> fields uint32_t to avoid inconsistencies.
>
> Signed-off-by: Piotr Sarna <sarna@skytechnology.pl>
> ---
> hw/core/qdev-properties.c | 12 ++++++------
> include/hw/block/block.h | 4 ++--
> include/hw/qdev-properties.h | 2 +-
> 3 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
> index 5bbc2d9..c4a1b8f 100644
> --- a/hw/core/qdev-properties.c
> +++ b/hw/core/qdev-properties.c
> @@ -728,17 +728,17 @@ static void set_blocksize(Object *obj, Visitor *v, const char *name,
> {
> DeviceState *dev = DEVICE(obj);
> Property *prop = opaque;
> - uint16_t value, *ptr = qdev_get_prop_ptr(dev, prop);
> + uint32_t value, *ptr = qdev_get_prop_ptr(dev, prop);
> Error *local_err = NULL;
> const int64_t min = 512;
> - const int64_t max = 32768;
> + const int64_t max = 2147483648;
Please see my reply to the v1 patch, this breaks IDE at least.
Kevin
next prev parent reply other threads:[~2018-02-09 15:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-09 10:36 [Qemu-devel] [PATCH v3] block: unify blocksize types Piotr Sarna
2018-02-09 15:12 ` Kevin Wolf [this message]
2018-02-09 15:50 ` 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=20180209151201.GI3998@localhost.localdomain \
--to=kwolf@redhat.com \
--cc=famz@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=sarna@skytechnology.pl \
/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).