From: Fam Zheng <famz@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
qemu-block@nongnu.org
Subject: [Qemu-devel] [PATCH 0/2] block: Reject negative values for throttling options
Date: Mon, 11 Jan 2016 13:42:37 +0800 [thread overview]
Message-ID: <1452490959-10387-1-git-send-email-famz@redhat.com> (raw)
Now the negative values are silently converted to a huge positive number
because we are doing implicit casting from uint64_t to double. Fix it and add a
test case (this was once fixed in 7d81c1413c9 but regressed when the block
device option parsing code was changed).
Fam Zheng (2):
blockdev: Error out on negative throttling option values
iotests: Test that negative throttle values are rejected
blockdev.c | 26 +++++++++++++-------------
tests/qemu-iotests/051 | 11 +++++++++++
tests/qemu-iotests/051.out | 21 +++++++++++++++++++++
tests/qemu-iotests/051.pc.out | 21 +++++++++++++++++++++
4 files changed, 66 insertions(+), 13 deletions(-)
--
2.4.3
next reply other threads:[~2016-01-11 5:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-11 5:42 Fam Zheng [this message]
2016-01-11 5:42 ` [Qemu-devel] [PATCH 1/2] blockdev: Error out on negative throttling option values Fam Zheng
2016-01-12 15:00 ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2016-01-13 0:29 ` Fam Zheng
2016-01-11 5:42 ` [Qemu-devel] [PATCH 2/2] iotests: Test that negative throttle values are rejected Fam Zheng
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=1452490959-10387-1-git-send-email-famz@redhat.com \
--to=famz@redhat.com \
--cc=armbru@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--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 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).