aboutsummaryrefslogtreecommitdiff
path: root/fsdev/qemu-fsdev-throttle.h
diff options
context:
space:
mode:
authorzhenwei pi <pizhenwei@bytedance.com>2023-07-28 10:20:05 +0800
committerHanna Czenczek <hreitz@redhat.com>2023-08-29 10:49:24 +0200
commit00ea69f50345258d1ff6262f24516abea5548d3a (patch)
treef0928f976f0eb55de2f040d769d3f7d6d6317650 /fsdev/qemu-fsdev-throttle.h
parent7017313882e39b6285e1a47dc474a395ba6f0e7d (diff)
fsdev: Use ThrottleDirection instread of bool is_write
'bool is_write' style is obsolete from throttle framework, adapt fsdev to the new style. Cc: Greg Kurz <groug@kaod.org> Reviewed-by: Hanna Czenczek <hreitz@redhat.com> Signed-off-by: zhenwei pi <pizhenwei@bytedance.com> Message-Id: <20230728022006.1098509-9-pizhenwei@bytedance.com> Reviewed-by: Greg Kurz <groug@kaod.org> Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
Diffstat (limited to 'fsdev/qemu-fsdev-throttle.h')
-rw-r--r--fsdev/qemu-fsdev-throttle.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fsdev/qemu-fsdev-throttle.h b/fsdev/qemu-fsdev-throttle.h
index a21aecddc7..daa8ca2494 100644
--- a/fsdev/qemu-fsdev-throttle.h
+++ b/fsdev/qemu-fsdev-throttle.h
@@ -23,14 +23,14 @@ typedef struct FsThrottle {
ThrottleState ts;
ThrottleTimers tt;
ThrottleConfig cfg;
- CoQueue throttled_reqs[2];
+ CoQueue throttled_reqs[THROTTLE_MAX];
} FsThrottle;
int fsdev_throttle_parse_opts(QemuOpts *, FsThrottle *, Error **);
void fsdev_throttle_init(FsThrottle *);
-void coroutine_fn fsdev_co_throttle_request(FsThrottle *, bool ,
+void coroutine_fn fsdev_co_throttle_request(FsThrottle *, ThrottleDirection ,
struct iovec *, int);
void fsdev_throttle_cleanup(FsThrottle *);