aspeed: add an I2C RTC device to all machines
[qemu.git] / fsdev / qemu-fsdev-throttle.h
blob4e83bdac25feacc438c6045f576c7d161995b583
1 /*
2 * Fsdev Throttle
4 * Copyright (C) 2016 Huawei Technologies Duesseldorf GmbH
6 * Author: Pradeep Jagadeesh <pradeep.jagadeesh@huawei.com>
8 * This work is licensed under the terms of the GNU GPL, version 2 or
9 * (at your option) any later version.
11 * See the COPYING file in the top-level directory for details.
15 #ifndef _FSDEV_THROTTLE_H
16 #define _FSDEV_THROTTLE_H
18 #include "block/aio.h"
19 #include "qemu/main-loop.h"
20 #include "qemu/coroutine.h"
21 #include "qemu/throttle.h"
23 typedef struct FsThrottle {
24 ThrottleState ts;
25 ThrottleTimers tt;
26 ThrottleConfig cfg;
27 CoQueue throttled_reqs[2];
28 } FsThrottle;
30 void fsdev_throttle_parse_opts(QemuOpts *, FsThrottle *, Error **);
32 void fsdev_throttle_init(FsThrottle *);
34 void coroutine_fn fsdev_co_throttle_request(FsThrottle *, bool ,
35 struct iovec *, int);
37 void fsdev_throttle_cleanup(FsThrottle *);
38 #endif /* _FSDEV_THROTTLE_H */