diff options
author | Kevin Wolf <kwolf@redhat.com> | 2019-07-22 17:22:00 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2019-08-16 10:25:16 +0200 |
commit | 421919d76b1755e1f9478f85cb71829ca5150ade (patch) | |
tree | da4129f7590bc0a33553733a545efbd9f6b19d8d /hw | |
parent | 48057fc2b4f010a5c92035d223a0cceed3635237 (diff) |
block: Remove blk_pread_unthrottled()
The functionality offered by blk_pread_unthrottled() goes back to commit
498e386c584. Then, we couldn't perform I/O throttling with synchronous
requests because timers wouldn't be executed in polling loops. So the
commit automatically disabled I/O throttling as soon as a synchronous
request was issued.
However, for geometry detection during disk initialisation, we always
used (and still use) synchronous requests even if guest requests use AIO
later. Geometry detection was not wanted to disable I/O throttling, so
bdrv_pread_unthrottled() was introduced which disabled throttling only
temporarily.
All of this isn't necessary any more because we do run timers in polling
loop and even synchronous requests are now using coroutine
infrastructure internally. For this reason, commit 90c78624f already
removed the automatic disabling of I/O throttling.
It's time to get rid of the workaround for the removed code, and its
abuse of blk_root_drained_begin()/end(), as well.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/block/hd-geometry.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/hw/block/hd-geometry.c b/hw/block/hd-geometry.c index 79384a2b0a..dcbccee294 100644 --- a/hw/block/hd-geometry.c +++ b/hw/block/hd-geometry.c @@ -63,12 +63,7 @@ static int guess_disk_lchs(BlockBackend *blk, blk_get_geometry(blk, &nb_sectors); - /** - * The function will be invoked during startup not only in sync I/O mode, - * but also in async I/O mode. So the I/O throttling function has to - * be disabled temporarily here, not permanently. - */ - if (blk_pread_unthrottled(blk, 0, buf, BDRV_SECTOR_SIZE) < 0) { + if (blk_pread(blk, 0, buf, BDRV_SECTOR_SIZE) < 0) { return -1; } /* test msdos magic */ |