[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [qemu-xen master] nbd: set name for all I/O channels created
commit 0d73f7253e4837603dbcbb7af0706d4d57124b5e Author: Daniel P. Berrange <berrange@xxxxxxxxxx> AuthorDate: Fri Sep 30 11:57:14 2016 +0100 Commit: Daniel P. Berrange <berrange@xxxxxxxxxx> CommitDate: Thu Oct 27 09:13:10 2016 +0200 nbd: set name for all I/O channels created Ensure that all I/O channels created for NBD are given names to distinguish their respective roles. Acked-by: Paolo Bonzini <pbonzini@xxxxxxxxxx> Reviewed-by: Stefan Hajnoczi <stefanha@xxxxxxxxxx> Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx> --- block/nbd.c | 1 + blockdev-nbd.c | 3 +++ nbd/client.c | 1 + nbd/server.c | 1 + 4 files changed, 6 insertions(+) diff --git a/block/nbd.c b/block/nbd.c index 6bc06d6..1ec64ab 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -248,6 +248,7 @@ static QIOChannelSocket *nbd_establish_connection(SocketAddress *saddr, Error *local_err = NULL; sioc = qio_channel_socket_new(); + qio_channel_set_name(QIO_CHANNEL(sioc), "nbd-client"); qio_channel_socket_connect_sync(sioc, saddr, diff --git a/blockdev-nbd.c b/blockdev-nbd.c index ca41cc6..81bca17 100644 --- a/blockdev-nbd.c +++ b/blockdev-nbd.c @@ -44,6 +44,7 @@ static gboolean nbd_accept(QIOChannel *ioc, GIOCondition condition, return TRUE; } + qio_channel_set_name(QIO_CHANNEL(cioc), "nbd-server"); nbd_client_new(NULL, cioc, nbd_server->tlscreds, NULL, nbd_client_put); @@ -111,6 +112,8 @@ void qmp_nbd_server_start(SocketAddress *addr, nbd_server = g_new0(NBDServerData, 1); nbd_server->watch = -1; nbd_server->listen_ioc = qio_channel_socket_new(); + qio_channel_set_name(QIO_CHANNEL(nbd_server->listen_ioc), + "nbd-listener"); if (qio_channel_socket_listen_sync( nbd_server->listen_ioc, addr, errp) < 0) { goto error; diff --git a/nbd/client.c b/nbd/client.c index a92f1e2..f6db836 100644 --- a/nbd/client.c +++ b/nbd/client.c @@ -387,6 +387,7 @@ static QIOChannel *nbd_receive_starttls(QIOChannel *ioc, if (!tioc) { return NULL; } + qio_channel_set_name(QIO_CHANNEL(tioc), "nbd-client-tls"); data.loop = g_main_loop_new(g_main_context_default(), FALSE); TRACE("Starting TLS handshake"); qio_channel_tls_handshake(tioc, diff --git a/nbd/server.c b/nbd/server.c index 472f584..36bcafc 100644 --- a/nbd/server.c +++ b/nbd/server.c @@ -349,6 +349,7 @@ static QIOChannel *nbd_negotiate_handle_starttls(NBDClient *client, return NULL; } + qio_channel_set_name(QIO_CHANNEL(tioc), "nbd-server-tls"); TRACE("Starting TLS handshake"); data.loop = g_main_loop_new(g_main_context_default(), FALSE); qio_channel_tls_handshake(tioc, -- generated by git-patchbot for /home/xen/git/qemu-xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |