aboutsummaryrefslogtreecommitdiff
path: root/include/qemu/throttle.h
diff options
context:
space:
mode:
authorzhenwei pi <pizhenwei@bytedance.com>2023-07-28 10:20:03 +0800
committerHanna Czenczek <hreitz@redhat.com>2023-08-29 10:49:24 +0200
commite76f201f69e76653f3e7301f2183421d9267e2f5 (patch)
treea2cb010b6cb8e03c74bd72d6fed5c196dab3df64 /include/qemu/throttle.h
parent27cf12298a2e3cb168880b6c7a36ea8cfbd8afb0 (diff)
downloadqemu-e76f201f69e76653f3e7301f2183421d9267e2f5.zip
qemu-e76f201f69e76653f3e7301f2183421d9267e2f5.tar.gz
qemu-e76f201f69e76653f3e7301f2183421d9267e2f5.tar.bz2
throttle: use enum ThrottleDirection instead of bool is_write
enum ThrottleDirection is already there, use ThrottleDirection instead of 'bool is_write' for throttle API, also modify related codes from block, fsdev, cryptodev and tests. Reviewed-by: Hanna Czenczek <hreitz@redhat.com> Signed-off-by: zhenwei pi <pizhenwei@bytedance.com> Message-Id: <20230728022006.1098509-7-pizhenwei@bytedance.com> Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
Diffstat (limited to 'include/qemu/throttle.h')
-rw-r--r--include/qemu/throttle.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/qemu/throttle.h b/include/qemu/throttle.h
index 9ca5ab8..181245d 100644
--- a/include/qemu/throttle.h
+++ b/include/qemu/throttle.h
@@ -154,9 +154,10 @@ void throttle_config_init(ThrottleConfig *cfg);
/* usage */
bool throttle_schedule_timer(ThrottleState *ts,
ThrottleTimers *tt,
- bool is_write);
+ ThrottleDirection direction);
-void throttle_account(ThrottleState *ts, bool is_write, uint64_t size);
+void throttle_account(ThrottleState *ts, ThrottleDirection direction,
+ uint64_t size);
void throttle_limits_to_config(ThrottleLimits *arg, ThrottleConfig *cfg,
Error **errp);
void throttle_config_to_limits(ThrottleConfig *cfg, ThrottleLimits *var);