mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
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>
This commit is contained in:
parent
27cf12298a
commit
e76f201f69
6 changed files with 36 additions and 27 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue