[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 01/13] throttle: Make throttle_compute_timer() stati
From: |
Alberto Garcia |
Subject: |
[Qemu-devel] [PATCH 01/13] throttle: Make throttle_compute_timer() static |
Date: |
Fri, 5 Feb 2016 12:59:11 +0200 |
This function is only used internally in throttle.c
Signed-off-by: Alberto Garcia <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;
--
2.7.0
- [Qemu-devel] [PATCH 00/13] throttle: Allow I/O bursts for a user-defined period of time, Alberto Garcia, 2016/02/05
- [Qemu-devel] [PATCH 05/13] throttle: Set always an average value when setting a maximum value, Alberto Garcia, 2016/02/05
- [Qemu-devel] [PATCH 09/13] throttle: Add command-line settings to define the burst periods, Alberto Garcia, 2016/02/05
- [Qemu-devel] [PATCH 06/13] throttle: Merge all functions that check the configuration into one, Alberto Garcia, 2016/02/05
- [Qemu-devel] [PATCH 01/13] throttle: Make throttle_compute_timer() static,
Alberto Garcia <=
- [Qemu-devel] [PATCH 04/13] throttle: Make throttle_is_valid() set errp, Alberto Garcia, 2016/02/05
- [Qemu-devel] [PATCH 02/13] throttle: Make throttle_conflicting() set errp, Alberto Garcia, 2016/02/05
- [Qemu-devel] [PATCH 12/13] throttle: Check that burst_level leaks correctly, Alberto Garcia, 2016/02/05
- [Qemu-devel] [PATCH 07/13] throttle: Use throttle_config_init() to initialize ThrottleConfig, Alberto Garcia, 2016/02/05
- [Qemu-devel] [PATCH 08/13] throttle: Add support for burst periods, Alberto Garcia, 2016/02/05
- [Qemu-devel] [PATCH 11/13] qapi: Add burst length fields to BlockDeviceInfo, Alberto Garcia, 2016/02/05
- [Qemu-devel] [PATCH 13/13] throttle: Test throttle_compute_wait() during bursts, Alberto Garcia, 2016/02/05
- [Qemu-devel] [PATCH 03/13] throttle: Make throttle_max_is_missing_limit() set errp, Alberto Garcia, 2016/02/05