* [Qemu-devel] [PATCH 1/1] parallels: fix default options parsing
@ 2017-03-20 9:27 Denis V. Lunev
2017-03-20 13:55 ` Markus Armbruster
2017-03-20 14:34 ` Stefan Hajnoczi
0 siblings, 2 replies; 3+ messages in thread
From: Denis V. Lunev @ 2017-03-20 9:27 UTC (permalink / raw)
To: stefanha
Cc: qemu-devel, Edgar Kaziahmedov, Denis V . Lunev, Markus Armbruster
From: Edgar Kaziahmedov <edos@virtuozzo.mipt.ru>
parallels block driver is completely broken since commit
commit 75cdcd1553e74b5edc58aed23e3b2da8dabb1876
Author: Markus Armbruster <armbru@redhat.com>
Date: Tue Feb 21 21:14:08 2017 +0100
option: Fix checking of sizes for overflow and trailing crap
Right now even simple
qemu-io -c "read 512 64k" 1.hds
ends up with
Unexpected error in parse_option_size() at util/qemu-option.c:188:
Parameter 'prealloc-size' expects a non-negative number below 2^64
Aborted (core dumped)
The cure is simple - we should use 'M' as a suffix in default option value
instead of 'MiB'.
Signed-off-by: Edgar Kaziahmedov <edos@virtuozzo.mipt.ru>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Markus Armbruster <armbru@redhat.com>
CC: Stefan Hajnoczi <stefanha@redhat.com>
---
block/parallels.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/parallels.c b/block/parallels.c
index 19935e2..6bf9375 100644
--- a/block/parallels.c
+++ b/block/parallels.c
@@ -114,7 +114,7 @@ static QemuOptsList parallels_runtime_opts = {
.name = PARALLELS_OPT_PREALLOC_SIZE,
.type = QEMU_OPT_SIZE,
.help = "Preallocation size on image expansion",
- .def_value_str = "128MiB",
+ .def_value_str = "128M",
},
{
.name = PARALLELS_OPT_PREALLOC_MODE,
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH 1/1] parallels: fix default options parsing
2017-03-20 9:27 [Qemu-devel] [PATCH 1/1] parallels: fix default options parsing Denis V. Lunev
@ 2017-03-20 13:55 ` Markus Armbruster
2017-03-20 14:34 ` Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Markus Armbruster @ 2017-03-20 13:55 UTC (permalink / raw)
To: Denis V. Lunev; +Cc: stefanha, Edgar Kaziahmedov, qemu-devel
"Denis V. Lunev" <den@openvz.org> writes:
> From: Edgar Kaziahmedov <edos@virtuozzo.mipt.ru>
>
> parallels block driver is completely broken since commit
> commit 75cdcd1553e74b5edc58aed23e3b2da8dabb1876
> Author: Markus Armbruster <armbru@redhat.com>
> Date: Tue Feb 21 21:14:08 2017 +0100
> option: Fix checking of sizes for overflow and trailing crap
> Right now even simple
> qemu-io -c "read 512 64k" 1.hds
> ends up with
> Unexpected error in parse_option_size() at util/qemu-option.c:188:
> Parameter 'prealloc-size' expects a non-negative number below 2^64
> Aborted (core dumped)
> The cure is simple - we should use 'M' as a suffix in default option value
> instead of 'MiB'.
>
> Signed-off-by: Edgar Kaziahmedov <edos@virtuozzo.mipt.ru>
> Signed-off-by: Denis V. Lunev <den@openvz.org>
> CC: Markus Armbruster <armbru@redhat.com>
> CC: Stefan Hajnoczi <stefanha@redhat.com>
> ---
> block/parallels.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/block/parallels.c b/block/parallels.c
> index 19935e2..6bf9375 100644
> --- a/block/parallels.c
> +++ b/block/parallels.c
> @@ -114,7 +114,7 @@ static QemuOptsList parallels_runtime_opts = {
> .name = PARALLELS_OPT_PREALLOC_SIZE,
> .type = QEMU_OPT_SIZE,
> .help = "Preallocation size on image expansion",
> - .def_value_str = "128MiB",
> + .def_value_str = "128M",
> },
> {
> .name = PARALLELS_OPT_PREALLOC_MODE,
Sorry for breaking this. git-grep def_value_str doesn't find more.
Reviewed-by: Markus Armbruster <armbru@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH 1/1] parallels: fix default options parsing
2017-03-20 9:27 [Qemu-devel] [PATCH 1/1] parallels: fix default options parsing Denis V. Lunev
2017-03-20 13:55 ` Markus Armbruster
@ 2017-03-20 14:34 ` Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2017-03-20 14:34 UTC (permalink / raw)
To: Denis V. Lunev; +Cc: stefanha, Edgar Kaziahmedov, qemu-devel, Markus Armbruster
[-- Attachment #1: Type: text/plain, Size: 1145 bytes --]
On Mon, Mar 20, 2017 at 12:27:02PM +0300, Denis V. Lunev wrote:
> From: Edgar Kaziahmedov <edos@virtuozzo.mipt.ru>
>
> parallels block driver is completely broken since commit
> commit 75cdcd1553e74b5edc58aed23e3b2da8dabb1876
> Author: Markus Armbruster <armbru@redhat.com>
> Date: Tue Feb 21 21:14:08 2017 +0100
> option: Fix checking of sizes for overflow and trailing crap
> Right now even simple
> qemu-io -c "read 512 64k" 1.hds
> ends up with
> Unexpected error in parse_option_size() at util/qemu-option.c:188:
> Parameter 'prealloc-size' expects a non-negative number below 2^64
> Aborted (core dumped)
> The cure is simple - we should use 'M' as a suffix in default option value
> instead of 'MiB'.
>
> Signed-off-by: Edgar Kaziahmedov <edos@virtuozzo.mipt.ru>
> Signed-off-by: Denis V. Lunev <den@openvz.org>
> CC: Markus Armbruster <armbru@redhat.com>
> CC: Stefan Hajnoczi <stefanha@redhat.com>
> ---
> block/parallels.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-03-20 14:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-20 9:27 [Qemu-devel] [PATCH 1/1] parallels: fix default options parsing Denis V. Lunev
2017-03-20 13:55 ` Markus Armbruster
2017-03-20 14:34 ` Stefan Hajnoczi
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).