Skip to content
  • Daniel P. Berrangé's avatar
    064097d9
    nbd: convert block client to use I/O channels for connection setup · 064097d9
    Daniel P. Berrangé authored
    
    
    This converts the NBD block driver client to use the QIOChannelSocket
    class for initial connection setup. The NbdClientSession struct has
    two pointers, one to the master QIOChannelSocket providing the raw
    data channel, and one to a QIOChannel which is the current channel
    used for I/O. Initially the two point to the same object, but when
    TLS support is added, they will point to different objects.
    
    The qemu-img & qemu-io tools now need to use MODULE_INIT_QOM to
    ensure the QIOChannel object classes are registered. The qemu-nbd
    tool already did this.
    
    In this initial conversion though, all I/O is still actually done
    using the raw POSIX sockets APIs.
    
    Signed-off-by: default avatarDaniel P. Berrange <berrange@redhat.com>
    Message-Id: <1455129674-17255-4-git-send-email-berrange@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    064097d9
    nbd: convert block client to use I/O channels for connection setup
    Daniel P. Berrangé authored
    
    
    This converts the NBD block driver client to use the QIOChannelSocket
    class for initial connection setup. The NbdClientSession struct has
    two pointers, one to the master QIOChannelSocket providing the raw
    data channel, and one to a QIOChannel which is the current channel
    used for I/O. Initially the two point to the same object, but when
    TLS support is added, they will point to different objects.
    
    The qemu-img & qemu-io tools now need to use MODULE_INIT_QOM to
    ensure the QIOChannel object classes are registered. The qemu-nbd
    tool already did this.
    
    In this initial conversion though, all I/O is still actually done
    using the raw POSIX sockets APIs.
    
    Signed-off-by: default avatarDaniel P. Berrange <berrange@redhat.com>
    Message-Id: <1455129674-17255-4-git-send-email-berrange@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Loading