xref: /openbmc/qemu/include/block/throttle-groups.h (revision 2ff1f2e3a39daf4a401a8904d00b29ea8c450463)
1*2ff1f2e3SAlberto Garcia /*
2*2ff1f2e3SAlberto Garcia  * QEMU block throttling group infrastructure
3*2ff1f2e3SAlberto Garcia  *
4*2ff1f2e3SAlberto Garcia  * Copyright (C) Nodalink, EURL. 2014
5*2ff1f2e3SAlberto Garcia  * Copyright (C) Igalia, S.L. 2015
6*2ff1f2e3SAlberto Garcia  *
7*2ff1f2e3SAlberto Garcia  * Authors:
8*2ff1f2e3SAlberto Garcia  *   Benoît Canet <benoit.canet@nodalink.com>
9*2ff1f2e3SAlberto Garcia  *   Alberto Garcia <berto@igalia.com>
10*2ff1f2e3SAlberto Garcia  *
11*2ff1f2e3SAlberto Garcia  * This program is free software; you can redistribute it and/or
12*2ff1f2e3SAlberto Garcia  * modify it under the terms of the GNU General Public License as
13*2ff1f2e3SAlberto Garcia  * published by the Free Software Foundation; either version 2 or
14*2ff1f2e3SAlberto Garcia  * (at your option) version 3 of the License.
15*2ff1f2e3SAlberto Garcia  *
16*2ff1f2e3SAlberto Garcia  * This program is distributed in the hope that it will be useful,
17*2ff1f2e3SAlberto Garcia  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18*2ff1f2e3SAlberto Garcia  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19*2ff1f2e3SAlberto Garcia  * GNU General Public License for more details.
20*2ff1f2e3SAlberto Garcia  *
21*2ff1f2e3SAlberto Garcia  * You should have received a copy of the GNU General Public License
22*2ff1f2e3SAlberto Garcia  * along with this program; if not, see <http://www.gnu.org/licenses/>.
23*2ff1f2e3SAlberto Garcia  */
24*2ff1f2e3SAlberto Garcia 
25*2ff1f2e3SAlberto Garcia #ifndef THROTTLE_GROUPS_H
26*2ff1f2e3SAlberto Garcia #define THROTTLE_GROUPS_H
27*2ff1f2e3SAlberto Garcia 
28*2ff1f2e3SAlberto Garcia #include "qemu/throttle.h"
29*2ff1f2e3SAlberto Garcia #include "block/block_int.h"
30*2ff1f2e3SAlberto Garcia 
31*2ff1f2e3SAlberto Garcia const char *throttle_group_get_name(BlockDriverState *bs);
32*2ff1f2e3SAlberto Garcia 
33*2ff1f2e3SAlberto Garcia void throttle_group_config(BlockDriverState *bs, ThrottleConfig *cfg);
34*2ff1f2e3SAlberto Garcia void throttle_group_get_config(BlockDriverState *bs, ThrottleConfig *cfg);
35*2ff1f2e3SAlberto Garcia 
36*2ff1f2e3SAlberto Garcia void throttle_group_register_bs(BlockDriverState *bs, const char *groupname);
37*2ff1f2e3SAlberto Garcia void throttle_group_unregister_bs(BlockDriverState *bs);
38*2ff1f2e3SAlberto Garcia 
39*2ff1f2e3SAlberto Garcia #endif
40