Skip to content
  • Kevin Wolf's avatar
    5d231849
    block: Add bdrv_try_set_aio_context() · 5d231849
    Kevin Wolf authored
    
    
    Eventually, we want to make sure that all parents and all children of a
    node are in the same AioContext as the node itself. This means that
    changing the AioContext may fail because one of the other involved
    parties (e.g. a guest device that was configured with an iothread)
    cannot allow switching to a different AioContext.
    
    Introduce a set of functions that allow to first check whether all
    involved nodes can switch to a new context and only then do the actual
    switch. The check recursively covers children and parents.
    
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    5d231849
    block: Add bdrv_try_set_aio_context()
    Kevin Wolf authored
    
    
    Eventually, we want to make sure that all parents and all children of a
    node are in the same AioContext as the node itself. This means that
    changing the AioContext may fail because one of the other involved
    parties (e.g. a guest device that was configured with an iothread)
    cannot allow switching to a different AioContext.
    
    Introduce a set of functions that allow to first check whether all
    involved nodes can switch to a new context and only then do the actual
    switch. The check recursively covers children and parents.
    
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
Loading