mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
block: Convert throttle_group_get_name() to BlockBackend
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
31dce3ccca
commit
49d2165d7d
6 changed files with 12 additions and 12 deletions
|
@ -133,16 +133,16 @@ void throttle_group_unref(ThrottleState *ts)
|
|||
qemu_mutex_unlock(&throttle_groups_lock);
|
||||
}
|
||||
|
||||
/* Get the name from a BlockDriverState's ThrottleGroup. The name (and
|
||||
* the pointer) is guaranteed to remain constant during the lifetime
|
||||
* of the group.
|
||||
/* Get the name from a BlockBackend's ThrottleGroup. The name (and the pointer)
|
||||
* is guaranteed to remain constant during the lifetime of the group.
|
||||
*
|
||||
* @bs: a BlockDriverState that is member of a throttling group
|
||||
* @blk: a BlockBackend that is member of a throttling group
|
||||
* @ret: the name of the group.
|
||||
*/
|
||||
const char *throttle_group_get_name(BlockDriverState *bs)
|
||||
const char *throttle_group_get_name(BlockBackend *blk)
|
||||
{
|
||||
ThrottleGroup *tg = container_of(bs->throttle_state, ThrottleGroup, ts);
|
||||
ThrottleGroup *tg = container_of(blk_bs(blk)->throttle_state,
|
||||
ThrottleGroup, ts);
|
||||
return tg->name;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue