]> git.proxmox.com Git - mirror_qemu.git/blobdiff - include/block/block_int.h
throttle: Add throttle group support
[mirror_qemu.git] / include / block / block_int.h
index 8d15c7b680c37952b37a125fb972bc6875238e51..b174852099546034ab6a5e8e3c7e46c0010d3c0c 100644 (file)
@@ -379,10 +379,13 @@ struct BlockDriverState {
     unsigned int serialising_in_flight;
 
     /* I/O throttling */
-    ThrottleState throttle_state;
-    ThrottleTimers throttle_timers;
     CoQueue      throttled_reqs[2];
     bool         io_limits_enabled;
+    /* 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];
     QLIST_ENTRY(BlockDriverState) round_robin;
 
     /* I/O stats (display with "info blockstats"). */