Skip to content
  • Kevin Wolf's avatar
    657e1203
    blockjob: Remove AioContext notifiers · 657e1203
    Kevin Wolf authored
    
    
    The notifiers made sure that the job is quiesced and that the
    job->aio_context field is updated. The first part is unnecessary today
    since bdrv_set_aio_context_ignore() drains the block node, and this
    means drainig the block job, too. The second part can be done in the
    .set_aio_ctx callback of the block job BdrvChildRole.
    
    The notifiers were problematic because they poll the AioContext while
    the graph is in an inconsistent state with some nodes already in the new
    context, but others still in the old context. So removing the notifiers
    not only simplifies the code, but actually makes the code safer.
    
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    657e1203
    blockjob: Remove AioContext notifiers
    Kevin Wolf authored
    
    
    The notifiers made sure that the job is quiesced and that the
    job->aio_context field is updated. The first part is unnecessary today
    since bdrv_set_aio_context_ignore() drains the block node, and this
    means drainig the block job, too. The second part can be done in the
    .set_aio_ctx callback of the block job BdrvChildRole.
    
    The notifiers were problematic because they poll the AioContext while
    the graph is in an inconsistent state with some nodes already in the new
    context, but others still in the old context. So removing the notifiers
    not only simplifies the code, but actually makes the code safer.
    
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
Loading