On 09/03/2016 02:45, Fam Zheng wrote: >> > @@ -555,11 +574,7 @@ static int bdrv_prwv_co(BlockDriverState *bs, int64_t >> > offset, >> > * will not fire; so the I/O throttling function has to be disabled >> > here >> > * if it has been enabled. >> > */ >> > - if (bs->io_limits_enabled) { >> > - fprintf(stderr, "Disabling I/O throttling on '%s' due " >> > - "to synchronous I/O.\n", >> > bdrv_get_device_name(bs)); >> > - bdrv_io_limits_disable(bs); >> > - } >> > + bdrv_no_throttling_begin(bs); >> > >> > if (qemu_in_coroutine()) { >> > /* Fast-path if already in coroutine context */ >> > @@ -573,6 +588,8 @@ static int bdrv_prwv_co(BlockDriverState *bs, int64_t >> > offset, >> > aio_poll(aio_context, true); >> > } >> > } >> > + >> > + bdrv_no_throttling_end(bs); > > Does this change the behavior? There wasn't a bdrv_io_limits_enable() here, > and > the throttle doesn't come back automatically. Just want to make sure it's > intended.
Yes, it's intended. As long as the I/O stays synchronous, throttling is disabled. If it starts to be asynchronous, it will be re-enabled automatically. Paolo