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:
Kevin Wolf 2016-03-21 11:58:21 +01:00
parent 31dce3ccca
commit 49d2165d7d
6 changed files with 12 additions and 12 deletions

View file

@ -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;
}