Skip to content
  • Stefan Hajnoczi's avatar
    block: let stream blockjob run in BDS AioContext · f3e69beb
    Stefan Hajnoczi authored
    
    
    The stream block job must run in the BlockDriverState AioContext so that
    it works with dataplane.
    
    The basics of acquiring the AioContext are easy in blockdev.c.
    
    The tricky part is the completion code which drops part of the backing
    file chain.  This must be done in the main loop where bdrv_unref() and
    bdrv_close() are safe to call.  Use block_job_defer_to_main_loop() to
    achieve that.
    
    Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
    Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
    Message-id: 1413889440-32577-9-git-send-email-stefanha@redhat.com
    f3e69beb