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)
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 801d29d849..afd92db01f 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;
}