summaryrefslogtreecommitdiffstats
path: root/include/sysemu/block-backend.h
diff options
context:
space:
mode:
authorKevin Wolf2016-03-21 11:30:57 +0100
committerKevin Wolf2016-05-19 16:45:29 +0200
commit31dce3ccca98bc9f9eb57f8b08b008edd07661ba (patch)
treedc0e381967d0135f1bc11beae16efc6b1391c31c /include/sysemu/block-backend.h
parentblock: Introduce BlockBackendPublic (diff)
downloadqemu-31dce3ccca98bc9f9eb57f8b08b008edd07661ba.tar.gz
qemu-31dce3ccca98bc9f9eb57f8b08b008edd07661ba.tar.xz
qemu-31dce3ccca98bc9f9eb57f8b08b008edd07661ba.zip
block: throttle-groups: Use BlockBackend pointers internally
As a first step towards moving I/O throttling to the BlockBackend level, this patch changes all pointers in struct ThrottleGroup from referencing a BlockDriverState to referencing a BlockBackend. This change is valid because we made sure that throttling can only be enabled on BDSes which have a BB attached. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include/sysemu/block-backend.h')
-rw-r--r--include/sysemu/block-backend.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h
index a771603bd0..1dcd70e2ca 100644
--- a/include/sysemu/block-backend.h
+++ b/include/sysemu/block-backend.h
@@ -63,7 +63,10 @@ typedef struct BlockDevOps {
* fields that must be public. This is in particular for QLIST_ENTRY() and
* friends so that BlockBackends can be kept in lists outside block-backend.c */
typedef struct BlockBackendPublic {
- int dummy; /* empty structs are illegal */
+ /* I/O throttling */
+ /* The following fields are protected by the ThrottleGroup lock.
+ * See the ThrottleGroup documentation for details. */
+ QLIST_ENTRY(BlockBackendPublic) round_robin;
} BlockBackendPublic;
BlockBackend *blk_new(Error **errp);