Skip to content
  • Kevin Wolf's avatar
    1908a559
    job: Move defer_to_main_loop to Job · 1908a559
    Kevin Wolf authored
    
    
    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: default avatarKevin Wolf <kwolf@redhat.com>
    Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
    Reviewed-by: default avatarJohn Snow <jsnow@redhat.com>
    1908a559
    job: Move defer_to_main_loop to Job
    Kevin Wolf authored
    
    
    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: default avatarKevin Wolf <kwolf@redhat.com>
    Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
    Reviewed-by: default avatarJohn Snow <jsnow@redhat.com>
Loading