From: Paolo Bonzini <pbonzini@redhat.com>
To: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 3/3] block: enforce constraints on block size properties
Date: Wed, 14 Mar 2012 17:04:51 +0100 [thread overview]
Message-ID: <4F60C1A3.8040506@redhat.com> (raw)
In-Reply-To: <1331740626-5053-4-git-send-email-stefanha@linux.vnet.ibm.com>
Il 14/03/2012 16:57, Stefan Hajnoczi ha scritto:
> Nicolae Mogoreanu <mogo@google.com> noticed that I/O requests can lead
> to QEMU crashes when the logical_block_size property is smaller than 512
> bytes.
>
> Using the new "blocksize" property we can properly enforce constraints
> on the block size such that QEMU's block layer is able to operate
> correctly.
>
> Reported-by: Nicolae Mogoreanu <mogo@google.com>
> Reported-by: Michael Halcrow <mhalcrow@google.com>
> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
> ---
> block.h | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/block.h b/block.h
> index 415bb17..3df6c30 100644
> --- a/block.h
> +++ b/block.h
> @@ -437,10 +437,10 @@ static inline unsigned int get_physical_block_exp(BlockConf *conf)
>
> #define DEFINE_BLOCK_PROPERTIES(_state, _conf) \
> DEFINE_PROP_DRIVE("drive", _state, _conf.bs), \
> - DEFINE_PROP_UINT16("logical_block_size", _state, \
> - _conf.logical_block_size, 512), \
> - DEFINE_PROP_UINT16("physical_block_size", _state, \
> - _conf.physical_block_size, 512), \
> + DEFINE_PROP_BLOCKSIZE("logical_block_size", _state, \
> + _conf.logical_block_size, 512), \
> + DEFINE_PROP_BLOCKSIZE("physical_block_size", _state, \
> + _conf.physical_block_size, 512), \
> DEFINE_PROP_UINT16("min_io_size", _state, _conf.min_io_size, 0), \
> DEFINE_PROP_UINT32("opt_io_size", _state, _conf.opt_io_size, 0), \
> DEFINE_PROP_INT32("bootindex", _state, _conf.bootindex, -1), \
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo
next prev parent reply other threads:[~2012-03-14 16:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-14 15:57 [Qemu-devel] [PATCH v2 0/3] block: enforce constraints on block size properties Stefan Hajnoczi
2012-03-14 15:57 ` [Qemu-devel] [PATCH v2 1/3] qerror: fix QERR_PROPERTY_VALUE_OUT_OF_RANGE description Stefan Hajnoczi
2012-03-14 16:03 ` Paolo Bonzini
2012-03-14 15:57 ` [Qemu-devel] [PATCH v2 2/3] qdev: add blocksize property type Stefan Hajnoczi
2012-03-14 16:04 ` Paolo Bonzini
2012-03-14 15:57 ` [Qemu-devel] [PATCH v2 3/3] block: enforce constraints on block size properties Stefan Hajnoczi
2012-03-14 16:04 ` Paolo Bonzini [this message]
2012-03-14 16:13 ` Kevin Wolf
2012-03-14 17:08 ` [Qemu-devel] [PATCH v2 0/3] " Stefan Hajnoczi
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=4F60C1A3.8040506@redhat.com \
--to=pbonzini@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@linux.vnet.ibm.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.