kvm: use start + size for memory ranges
[qemu/ar7.git] / fsdev / qemu-fsdev-throttle.h
blobe418643ccbeaef302753218aa58a3bbe006f3363
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 "qapi/error.h"
22 #include "qemu/throttle.h"
24 typedef struct FsThrottle {
25 ThrottleState ts;
26 ThrottleTimers tt;
27 ThrottleConfig cfg;
28 CoQueue throttled_reqs[2];
29 } FsThrottle;
31 void fsdev_throttle_parse_opts(QemuOpts *, FsThrottle *, Error **);
33 void fsdev_throttle_init(FsThrottle *);
35 void coroutine_fn fsdev_co_throttle_request(FsThrottle *, bool ,
36 struct iovec *, int);
38 void fsdev_throttle_cleanup(FsThrottle *);
39 #endif /* _FSDEV_THROTTLE_H */