block: Drain throttling queue with BdrvChild callback
commitc2066af0514d80a805dac82accaec1121babfa15
authorKevin Wolf <kwolf@redhat.com>
Tue, 22 Mar 2016 11:05:35 +0000 (22 12:05 +0100)
committerKevin Wolf <kwolf@redhat.com>
Thu, 19 May 2016 14:45:30 +0000 (19 16:45 +0200)
tree2a1eebe6ab1f73451c39533a178986cbd5239569
parent22aa8b246ada8d45add8eef64d4640a20b4f7ef3
block: Drain throttling queue with BdrvChild callback

This removes the last part of I/O throttling from block/io.c and moves
it to the BlockBackend.

Instead of having knowledge about throttling inside io.c, we can call a
BdrvChild callback .drained_begin/end, which happens to drain the
throttled requests for BlockBackend parents.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
block/block-backend.c
block/io.c
include/block/block_int.h