[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 14/34] throttle: Make throttle_compute_timer() static
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 14/34] throttle: Make throttle_compute_timer() static |
Date: |
Mon, 22 Feb 2016 17:32:32 +0100 |
From: Alberto Garcia <address@hidden>
This function is only used internally in throttle.c
Signed-off-by: Alberto Garcia <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
include/qemu/throttle.h | 6 ------
util/throttle.c | 8 ++++----
2 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/include/qemu/throttle.h b/include/qemu/throttle.h
index d0c98ed..52c98d9 100644
--- a/include/qemu/throttle.h
+++ b/include/qemu/throttle.h
@@ -84,12 +84,6 @@ void throttle_leak_bucket(LeakyBucket *bkt, int64_t delta);
int64_t throttle_compute_wait(LeakyBucket *bkt);
-/* expose timer computation function for unit tests */
-bool throttle_compute_timer(ThrottleState *ts,
- bool is_write,
- int64_t now,
- int64_t *next_timestamp);
-
/* init/destroy cycle */
void throttle_init(ThrottleState *ts);
diff --git a/util/throttle.c b/util/throttle.c
index 2f9b23d..c21043a 100644
--- a/util/throttle.c
+++ b/util/throttle.c
@@ -137,10 +137,10 @@ static int64_t throttle_compute_wait_for(ThrottleState
*ts,
* @next_timestamp: the resulting timer
* @ret: true if a timer must be set
*/
-bool throttle_compute_timer(ThrottleState *ts,
- bool is_write,
- int64_t now,
- int64_t *next_timestamp)
+static bool throttle_compute_timer(ThrottleState *ts,
+ bool is_write,
+ int64_t now,
+ int64_t *next_timestamp)
{
int64_t wait;
--
1.8.3.1
- [Qemu-block] [PULL 03/34] spec: add qcow2 bitmaps extension specification, (continued)
- [Qemu-block] [PULL 03/34] spec: add qcow2 bitmaps extension specification, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 01/34] qemu-img: initialize MapEntry object, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 05/34] qemu-io: add support for --object command line arg, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 07/34] qemu-io: allow specifying image as a set of options args, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 08/34] qemu-nbd: allow specifying image as a set of options args, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 04/34] block: Fix -incoming with snapshot=on, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 06/34] qemu-img: add support for --object command line arg, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 12/34] qemu-io: use no_argument/required_argument constants, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 10/34] qemu-nbd: don't overlap long option values with short options, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 13/34] block migration: Activate image on destination before writing to it, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 14/34] throttle: Make throttle_compute_timer() static,
Kevin Wolf <=
- [Qemu-block] [PULL 09/34] qemu-img: allow specifying image as a set of options args, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 11/34] qemu-nbd: use no_argument/required_argument constants, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 15/34] throttle: Make throttle_conflicting() set errp, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 18/34] throttle: Set always an average value when setting a maximum value, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 17/34] throttle: Make throttle_is_valid() set errp, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 22/34] throttle: Add command-line settings to define the burst periods, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 24/34] qapi: Add burst length fields to BlockDeviceInfo, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 16/34] throttle: Make throttle_max_is_missing_limit() set errp, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 30/34] MAINTAINERS: Add myself as maintainer of the throttling code, Kevin Wolf, 2016/02/22
- [Qemu-block] [PULL 20/34] throttle: Use throttle_config_init() to initialize ThrottleConfig, Kevin Wolf, 2016/02/22