block: Decouple throttling from BlockDriverState
commit7ca7f0f6db1fedd28d490795d778cf23979a2aa7
authorKevin Wolf <kwolf@redhat.com>
Tue, 22 Mar 2016 12:00:08 +0000 (22 13:00 +0100)
committerKevin Wolf <kwolf@redhat.com>
Thu, 19 May 2016 14:45:30 +0000 (19 16:45 +0200)
tree0304aae791827e914e5cf677bb4a9864efcd3641
parentbb9aaecaf1d9b9d7da8f8c73a4cbf3afd9848abe
block: Decouple throttling from BlockDriverState

This moves the throttling related part of the BDS life cycle management
to BlockBackend. The throttling group reference is now kept even when no
medium is inserted.

With this commit, throttling isn't disabled and then re-enabled any more
during graph reconfiguration. This fixes the temporary breakage of I/O
throttling when used with live snapshots or block jobs that manipulate
the graph.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
block.c
block/block-backend.c
blockdev.c
include/block/block_int.h