]> Git Repo - qemu.git/commit
mirror: fix request throttling in drive-mirror
authorDenis V. Lunev <[email protected]>
Wed, 22 Jun 2016 12:35:27 +0000 (15:35 +0300)
committerJeff Cody <[email protected]>
Tue, 19 Jul 2016 21:03:44 +0000 (17:03 -0400)
commitcf56a3c632d039d00e29dfe8676321d6d349190c
tree1445c0baf0315e691387634eecf2ad54be375f45
parent4b5004d9fc5b7d8e4447dc81c2f26477c2d590f7
mirror: fix request throttling in drive-mirror

There are 2 deficiencies here:
- mirror_iteration could start several requests inside. Thus we could
  simply have more in_flight requests than MAX_IN_FLIGHT.
- keeping this in mind throttling in mirror_run which is checking
  s->in_flight == MAX_IN_FLIGHT is wrong.

The patch adds the check and throttling into mirror_iteration and fixes
the check in mirror_run() to be sure.

Signed-off-by: Denis V. Lunev <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Message-id: 1466598927[email protected]
CC: Jeff Cody <[email protected]>
CC: Kevin Wolf <[email protected]>
CC: Max Reitz <[email protected]>
Signed-off-by: Jeff Cody <[email protected]>
(cherry picked from commit e648dc95c28fbca12e67be26a1fc4b9a0676c3fe)
block/mirror.c
This page took 0.023597 seconds and 4 git commands to generate.