qemu-patch-raspberry4/include/block
Alberto Garcia a0d64a61db throttle: Use bs->throttle_state instead of bs->io_limits_enabled
There are two ways to check for I/O limits in a BlockDriverState:

- bs->throttle_state: if this pointer is not NULL, it means that this
  BDS is member of a throttling group, its ThrottleTimers structure
  has been initialized and its I/O limits are ready to be applied.

- bs->io_limits_enabled: if true it means that the throttle_state
  pointer is valid _and_ the limits are currently enabled.

The latter is used in several places to check whether a BDS has I/O
limits configured, but what it really checks is whether requests
are being throttled or not. For example, io_limits_enabled can be
temporarily set to false in cases like bdrv_read_unthrottled() without
otherwise touching the throtting configuration of that BDS.

This patch replaces bs->io_limits_enabled with bs->throttle_state in
all cases where what we really want to check is the existence of I/O
limits, not whether they are currently enabled or not.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-11-11 16:25:47 +01:00
..
accounting.h block: Remove wr_highest_sector from BlockAcctStats 2015-10-23 18:18:23 +02:00
aio.h aio: Introduce aio-epoll.c 2015-11-09 09:59:47 +00:00
block.h block: Introduce "drained begin/end" API 2015-10-23 18:18:24 +02:00
block_int.h throttle: Use bs->throttle_state instead of bs->io_limits_enabled 2015-11-11 16:25:47 +01:00
blockjob.h blockjob: Store device name at job creation 2015-10-16 15:34:30 +02:00
nbd.h nbd: Set block size to BDRV_SECTOR_SIZE 2015-03-18 12:07:01 +01:00
qapi.h qmp: fill in the image field in BlockDeviceInfo 2015-04-28 15:36:09 +02:00
scsi.h typofixes - v4 2015-09-11 10:45:43 +03:00
snapshot.h qemu-nbd: support internal snapshot export 2013-12-04 15:19:00 +01:00
thread-pool.h block: Rename BlockDriverCompletionFunc to BlockCompletionFunc 2014-10-20 13:41:27 +02:00
throttle-groups.h throttle: Remove throttle_group_lock/unlock() 2015-10-23 18:18:23 +02:00
write-threshold.h block: add event when disk usage exceeds threshold 2015-02-06 17:24:21 +01:00