]> git.proxmox.com Git - mirror_qemu.git/blame - fsdev/qemu-fsdev-throttle.h
Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging
[mirror_qemu.git] / fsdev / qemu-fsdev-throttle.h
CommitLineData
b8bbdb88
PJ
1/*
2 * Fsdev Throttle
3 *
4 * Copyright (C) 2016 Huawei Technologies Duesseldorf GmbH
5 *
6 * Author: Pradeep Jagadeesh <pradeep.jagadeesh@huawei.com>
7 *
8 * This work is licensed under the terms of the GNU GPL, version 2 or
9 * (at your option) any later version.
10 *
11 * See the COPYING file in the top-level directory for details.
12 *
13 */
14
58ea30f5
MA
15#ifndef QEMU_FSDEV_THROTTLE_H
16#define QEMU_FSDEV_THROTTLE_H
b8bbdb88
PJ
17
18#include "block/aio.h"
b8bbdb88 19#include "qemu/coroutine.h"
b8bbdb88
PJ
20#include "qemu/throttle.h"
21
22typedef struct FsThrottle {
23 ThrottleState ts;
24 ThrottleTimers tt;
25 ThrottleConfig cfg;
26 CoQueue throttled_reqs[2];
27} FsThrottle;
28
ea52cdd4 29int fsdev_throttle_parse_opts(QemuOpts *, FsThrottle *, Error **);
b8bbdb88
PJ
30
31void fsdev_throttle_init(FsThrottle *);
32
33void coroutine_fn fsdev_co_throttle_request(FsThrottle *, bool ,
34 struct iovec *, int);
35
36void fsdev_throttle_cleanup(FsThrottle *);
58ea30f5
MA
37
38#endif /* QEMU_FSDEV_THROTTLE_H */