diff options
author | Kevin Wolf | 2016-03-21 12:56:44 +0100 |
---|---|---|
committer | Kevin Wolf | 2016-05-19 16:45:30 +0200 |
commit | 27ccdd52598290f0f8b58be56e235aff7aebfaf3 (patch) | |
tree | 3eae4aa48f08ad96ad0a9461ea52cf1ef160d0fc /include/block | |
parent | block: Convert throttle_group_get_name() to BlockBackend (diff) | |
download | qemu-27ccdd52598290f0f8b58be56e235aff7aebfaf3.tar.gz qemu-27ccdd52598290f0f8b58be56e235aff7aebfaf3.tar.xz qemu-27ccdd52598290f0f8b58be56e235aff7aebfaf3.zip |
block: Move throttling fields from BDS to BB
This patch changes where the throttling state is stored (used to be the
BlockDriverState, now it is the BlockBackend), but it doesn't actually
make it a BB level feature yet. For example, throttling is still
disabled when the BDS is detached from the BB.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include/block')
-rw-r--r-- | include/block/block_int.h | 13 | ||||
-rw-r--r-- | include/block/throttle-groups.h | 2 |
2 files changed, 1 insertions, 14 deletions
diff --git a/include/block/block_int.h b/include/block/block_int.h index 3f5d2b1ccc..2bbc2c0609 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -26,7 +26,6 @@ #include "block/accounting.h" #include "block/block.h" -#include "block/throttle-groups.h" #include "qemu/option.h" #include "qemu/queue.h" #include "qemu/coroutine.h" @@ -424,18 +423,6 @@ struct BlockDriverState { /* number of in-flight serialising requests */ unsigned int serialising_in_flight; - /* I/O throttling. - * throttle_state tells us if this BDS has I/O limits configured. - * io_limits_disabled tells us if they are currently being enforced */ - CoQueue throttled_reqs[2]; - unsigned int io_limits_disabled; - - /* The following fields are protected by the ThrottleGroup lock. - * See the ThrottleGroup documentation for details. */ - ThrottleState *throttle_state; - ThrottleTimers throttle_timers; - unsigned pending_reqs[2]; - /* Offset after the highest byte written to */ uint64_t wr_highest_offset; diff --git a/include/block/throttle-groups.h b/include/block/throttle-groups.h index bd55a34194..840ba443ae 100644 --- a/include/block/throttle-groups.h +++ b/include/block/throttle-groups.h @@ -38,7 +38,7 @@ void throttle_group_get_config(BlockDriverState *bs, ThrottleConfig *cfg); void throttle_group_register_blk(BlockBackend *blk, const char *groupname); void throttle_group_unregister_blk(BlockBackend *blk); -void throttle_group_restart_bs(BlockDriverState *bs); +void throttle_group_restart_blk(BlockBackend *blk); void coroutine_fn throttle_group_co_io_limits_intercept(BlockDriverState *bs, unsigned int bytes, |