aboutsummaryrefslogtreecommitdiff
path: root/blockjob.c
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2018-03-10 03:27:26 -0500
committerKevin Wolf <kwolf@redhat.com>2018-03-19 12:01:24 +0100
commitd4fce188448a273306b0c1c915e7bd91d6f83a6e (patch)
tree01f5a8e7105cbeb2a2fd35a089c350674bc7492e /blockjob.c
parente1e44a9916b4318e943aecd669e096222cb3eaeb (diff)
downloadqemu-d4fce188448a273306b0c1c915e7bd91d6f83a6e.zip
qemu-d4fce188448a273306b0c1c915e7bd91d6f83a6e.tar.gz
qemu-d4fce188448a273306b0c1c915e7bd91d6f83a6e.tar.bz2
blockjobs: fix set-speed kick
If speed is '0' it's not actually "less than" the previous speed. Kick the job in this case too. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'blockjob.c')
-rw-r--r--blockjob.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/blockjob.c b/blockjob.c
index 801d29d..afd92db 100644
--- a/blockjob.c
+++ b/blockjob.c
@@ -499,7 +499,7 @@ void block_job_set_speed(BlockJob *job, int64_t speed, Error **errp)
}
job->speed = speed;
- if (speed <= old_speed) {
+ if (speed && speed <= old_speed) {
return;
}