Skip to content
  • Stefan Hajnoczi's avatar
    4c7e813c
    blockjob: do not cancel timer in resume · 4c7e813c
    Stefan Hajnoczi authored
    
    
    Currently the timer is cancelled and the block job is entered by
    block_job_resume().  This behavior causes drain to run extra blockjob
    iterations when the job was sleeping due to the ratelimit.
    
    This patch leaves the job asleep when block_job_resume() is called.
    Jobs can still be forcibly woken up using block_job_enter(), which is
    used to cancel jobs.
    
    After this patch drain no longer runs extra blockjob iterations.  This
    is the expected behavior that qemu-iotests 185 used to rely on.  We
    temporarily changed the 185 test output to make it pass for the QEMU
    2.12 release but now it's time to address this issue.
    
    Cc: QingFeng Hao <haoqf@linux.vnet.ibm.com>
    Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
    Reviewed-by: default avatarQingFeng Hao <haoqf@linux.vnet.ibm.com>
    Message-id: 20180508135436.30140-3-stefanha@redhat.com
    Reviewed-by: default avatarJeff Cody <jcody@redhat.com>
    Signed-off-by: default avatarJeff Cody <jcody@redhat.com>
    4c7e813c
    blockjob: do not cancel timer in resume
    Stefan Hajnoczi authored
    
    
    Currently the timer is cancelled and the block job is entered by
    block_job_resume().  This behavior causes drain to run extra blockjob
    iterations when the job was sleeping due to the ratelimit.
    
    This patch leaves the job asleep when block_job_resume() is called.
    Jobs can still be forcibly woken up using block_job_enter(), which is
    used to cancel jobs.
    
    After this patch drain no longer runs extra blockjob iterations.  This
    is the expected behavior that qemu-iotests 185 used to rely on.  We
    temporarily changed the 185 test output to make it pass for the QEMU
    2.12 release but now it's time to address this issue.
    
    Cc: QingFeng Hao <haoqf@linux.vnet.ibm.com>
    Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
    Reviewed-by: default avatarQingFeng Hao <haoqf@linux.vnet.ibm.com>
    Message-id: 20180508135436.30140-3-stefanha@redhat.com
    Reviewed-by: default avatarJeff Cody <jcody@redhat.com>
    Signed-off-by: default avatarJeff Cody <jcody@redhat.com>
Loading