[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-block] [PATCH v4 0/2] block: Reject negative values for throttling

From: Fam Zheng
Subject: [Qemu-block] [PATCH v4 0/2] block: Reject negative values for throttling options
Date: Fri, 15 Jan 2016 10:09:21 +0800

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(-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]