]> git.proxmox.com Git - mirror_qemu.git/blame - include/block/throttle-groups.h
Merge remote-tracking branch 'remotes/dgilbert/tags/pull-hmp-20170331' into staging
[mirror_qemu.git] / include / block / throttle-groups.h
CommitLineData
2ff1f2e3
AG
1/*
2 * QEMU block throttling group infrastructure
3 *
4 * Copyright (C) Nodalink, EURL. 2014
5 * Copyright (C) Igalia, S.L. 2015
6 *
7 * Authors:
8 * BenoƮt Canet <benoit.canet@nodalink.com>
9 * Alberto Garcia <berto@igalia.com>
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License as
13 * published by the Free Software Foundation; either version 2 or
14 * (at your option) version 3 of the License.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, see <http://www.gnu.org/licenses/>.
23 */
24
25#ifndef THROTTLE_GROUPS_H
26#define THROTTLE_GROUPS_H
27
28#include "qemu/throttle.h"
29#include "block/block_int.h"
30
49d2165d 31const char *throttle_group_get_name(BlockBackend *blk);
2ff1f2e3 32
973f2ddf
HR
33ThrottleState *throttle_group_incref(const char *name);
34void throttle_group_unref(ThrottleState *ts);
35
97148076
KW
36void throttle_group_config(BlockBackend *blk, ThrottleConfig *cfg);
37void throttle_group_get_config(BlockBackend *blk, ThrottleConfig *cfg);
2ff1f2e3 38
31dce3cc
KW
39void throttle_group_register_blk(BlockBackend *blk, const char *groupname);
40void throttle_group_unregister_blk(BlockBackend *blk);
27ccdd52 41void throttle_group_restart_blk(BlockBackend *blk);
2ff1f2e3 42
441565b2 43void coroutine_fn throttle_group_co_io_limits_intercept(BlockBackend *blk,
76f4afb4
AG
44 unsigned int bytes,
45 bool is_write);
46
2ff1f2e3 47#endif