blockdev: acquire AioContext in block_set_io_throttle
authorStefan Hajnoczi <stefanha@redhat.com>
Wed, 14 May 2014 14:22:47 +0000 (16:22 +0200)
committerStefan Hajnoczi <stefanha@redhat.com>
Wed, 4 Jun 2014 07:56:12 +0000 (09:56 +0200)
commitb15446fdbf4ac2b29f6ee5080630a80715abfc20
tree8898c63d88b9b5fd673a5fae6e27d95712b48135
parent22524f726210f38298dfb1cefa30257133ad6b8c
blockdev: acquire AioContext in block_set_io_throttle

The block_set_io_throttle QMP and HMP commands modify I/O throttling
limits for block devices.

Acquire the BlockDriverState's AioContext to protect against race
conditions with an IOThread that is running I/O for this device.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
blockdev.c