diff options
author | Kevin Wolf <kwolf@redhat.com> | 2016-03-22 16:11:33 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2016-05-19 16:45:31 +0200 |
commit | cbe1beb7a1eaa34e0c24b4897395dac017e5d16f (patch) | |
tree | 9ce2964467fcfb23c0c9b48a625b345d8ae14533 /block | |
parent | b26ded9a7d9709aacdff36e39630acbb87201057 (diff) |
block: Don't check throttled reqs in bdrv_requests_pending()
Checking whether there are throttled requests requires going to the
associated BlockBackend, which we want to avoid.
All users of bdrv_requests_pending() in block/io.c already call
bdrv_parent_drained_begin() first, which restarts all throttled
requests, so no throttled requests can be left here and this is removal
of dead code.
The remaining users (assertions during graph manipulation in block.c)
don't care about requests that are still queued in the BlockBackend and
haven't been issued for a BlockDriverState yet.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/io.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/block/io.c b/block/io.c index 23abbc52fe..6e90805019 100644 --- a/block/io.c +++ b/block/io.c @@ -147,17 +147,10 @@ void bdrv_disable_copy_on_read(BlockDriverState *bs) bool bdrv_requests_pending(BlockDriverState *bs) { BdrvChild *child; - BlockBackendPublic *blkp = bs->blk ? blk_get_public(bs->blk) : NULL; if (!QLIST_EMPTY(&bs->tracked_requests)) { return true; } - if (blkp && !qemu_co_queue_empty(&blkp->throttled_reqs[0])) { - return true; - } - if (blkp && !qemu_co_queue_empty(&blkp->throttled_reqs[1])) { - return true; - } QLIST_FOREACH(child, &bs->children, next) { if (bdrv_requests_pending(child->bs)) { |