Skip to content
  • Paolo Bonzini's avatar
    qemu-nbd: asynchronous operation · 262db388
    Paolo Bonzini authored
    
    
    Using coroutines enable asynchronous operation on both the network and
    the block side.  Network can be owned by two coroutines at the same time,
    one writing and one reading.  On the send side, mutual exclusion is
    guaranteed by a CoMutex.  On the receive side, mutual exclusion is
    guaranteed because new coroutines immediately start receiving data,
    and no new coroutines are created as long as the previous one is receiving.
    
    Between receive and send, qemu-nbd can have an arbitrary number of
    in-flight block transfers.  Throttling is implemented by the next
    patch.
    
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    262db388