• K
    job: Move defer_to_main_loop to Job · 1908a559
    Kevin Wolf 提交于
    Move the defer_to_main_loop functionality from BlockJob to Job.
    
    The code can be simplified because we can use job->aio_context in
    job_defer_to_main_loop_bh() now, instead of having to access the
    BlockDriverState.
    
    Probably taking the data->aio_context lock in addition was already
    unnecessary in the old code because we didn't actually make use of
    anything protected by the old AioContext except getting the new
    AioContext, in case it changed between scheduling the BH and running it.
    But it's certainly unnecessary now that the BDS isn't accessed at all
    any more.
    Signed-off-by: NKevin Wolf <kwolf@redhat.com>
    Reviewed-by: NMax Reitz <mreitz@redhat.com>
    Reviewed-by: NJohn Snow <jsnow@redhat.com>
    1908a559
mirror.c 44.0 KB