Skip to content
  • Kevin Wolf's avatar
    34dc97b9
    blockjob: Wake up BDS when job becomes idle · 34dc97b9
    Kevin Wolf authored
    
    
    In the context of draining a BDS, the .drained_poll callback of block
    jobs is called. If this returns true (i.e. there is still some activity
    pending), the drain operation may call aio_poll() with blocking=true to
    wait for completion.
    
    As soon as the pending activity is completed and the job finally arrives
    in a quiescent state (i.e. its coroutine either yields with busy=false
    or terminates), the block job must notify the aio_poll() loop to wake
    up, otherwise we get a deadlock if both are running in different
    threads.
    
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    Reviewed-by: default avatarFam Zheng <famz@redhat.com>
    Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
    34dc97b9
    blockjob: Wake up BDS when job becomes idle
    Kevin Wolf authored
    
    
    In the context of draining a BDS, the .drained_poll callback of block
    jobs is called. If this returns true (i.e. there is still some activity
    pending), the drain operation may call aio_poll() with blocking=true to
    wait for completion.
    
    As soon as the pending activity is completed and the job finally arrives
    in a quiescent state (i.e. its coroutine either yields with busy=false
    or terminates), the block job must notify the aio_poll() loop to wake
    up, otherwise we get a deadlock if both are running in different
    threads.
    
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    Reviewed-by: default avatarFam Zheng <famz@redhat.com>
    Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
Loading