qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	berto@igalia.com, qemu-block@nongnu.org,
	Markus Armbruster <armbru@redhat.com>,
	mreitz@redhat.com
Subject: [Qemu-devel] [PATCH v4 0/2] block: Reject negative values for throttling options
Date: Fri, 15 Jan 2016 10:09:21 +0800	[thread overview]
Message-ID: <1452823763-4235-1-git-send-email-famz@redhat.com> (raw)

v4: Add Max's rev-by in both patches, while fixing the "maxs" typo.

v3: Address comments:
    - Add test for large value; [Berto]
    - Fix typos "negative" & "caught"; [Eric, Berto]
    - Use "LL" suffix to the upper limit constant. [Berto]

v2: Check the value range and report an appropriate error. [Berto]

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 and large throttle values are rejected

 blockdev.c                    |  3 ++-
 include/qemu/throttle.h       |  2 ++
 tests/qemu-iotests/051        | 12 ++++++++++++
 tests/qemu-iotests/051.out    | 24 ++++++++++++++++++++++++
 tests/qemu-iotests/051.pc.out | 24 ++++++++++++++++++++++++
 util/throttle.c               | 16 ++++++----------
 6 files changed, 70 insertions(+), 11 deletions(-)

-- 
2.4.3

             reply	other threads:[~2016-01-15  2:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-15  2:09 Fam Zheng [this message]
2016-01-15  2:09 ` [Qemu-devel] [PATCH v4 1/2] blockdev: Error out on negative throttling option values Fam Zheng
2016-01-15 14:26   ` Markus Armbruster
2016-01-15 14:28   ` Kevin Wolf
2016-01-18  1:09     ` Fam Zheng
2016-01-19 15:07       ` Alberto Garcia
2016-01-15  2:09 ` [Qemu-devel] [PATCH v4 2/2] iotests: Test that negative and large throttle values are rejected Fam Zheng
2016-01-19 15:12   ` Alberto Garcia
2016-01-19  9:50 ` [Qemu-devel] [PATCH v4 0/2] block: Reject negative values for throttling options Markus Armbruster
2016-01-20  2:55   ` 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=1452823763-4235-1-git-send-email-famz@redhat.com \
    --to=famz@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berto@igalia.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@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).