Stefan Hajnoczi 13af91ebf0 throttle: add throttle_detach/attach_aio_context()
Block I/O throttling uses timers and currently always adds them to the
main loop.  Throttling will break if bdrv_set_aio_context() is used to
move a BlockDriverState to a different AioContext.

This patch adds throttle_detach/attach_aio_context() interfaces so the
throttling timers and uses them to move timers to the new AioContext.
Note that bdrv_set_aio_context() already drains all requests so we're
sure no throttled requests are pending.

The test cases need to be updated since the throttle_init() interface
has changed.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
2014-06-04 09:56:12 +02:00
..
2013-11-21 08:01:06 -08:00
2014-01-13 14:04:53 +01:00
2013-02-16 11:11:34 +00:00
2014-05-30 13:00:28 -06:00
2014-02-20 13:14:18 +01:00
2014-02-01 13:46:06 +04:00
2014-03-13 14:42:21 +01:00
2013-10-17 17:30:55 +02:00
2013-10-17 17:30:55 +02:00
2014-01-15 23:34:17 +04:00