[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/13] nbd: drop unused nbd_start_negotiate() aio_context argument
From: |
Eric Blake |
Subject: |
[PULL 03/13] nbd: drop unused nbd_start_negotiate() aio_context argument |
Date: |
Thu, 7 Sep 2023 20:35:39 -0500 |
From: Stefan Hajnoczi <stefanha@redhat.com>
aio_context is always NULL, so drop it.
Suggested-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20230830224802.493686-3-stefanha@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
---
nbd/client.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/nbd/client.c b/nbd/client.c
index 16ec10c8a91..bd7e2001366 100644
--- a/nbd/client.c
+++ b/nbd/client.c
@@ -877,8 +877,7 @@ static int nbd_list_meta_contexts(QIOChannel *ioc,
* Returns: negative errno: failure talking to server
* non-negative: enum NBDMode describing server abilities
*/
-static int nbd_start_negotiate(AioContext *aio_context, QIOChannel *ioc,
- QCryptoTLSCreds *tlscreds,
+static int nbd_start_negotiate(QIOChannel *ioc, QCryptoTLSCreds *tlscreds,
const char *hostname, QIOChannel **outioc,
bool structured_reply, bool *zeroes,
Error **errp)
@@ -946,10 +945,6 @@ static int nbd_start_negotiate(AioContext *aio_context,
QIOChannel *ioc,
return -EINVAL;
}
ioc = *outioc;
- if (aio_context) {
- qio_channel_set_blocking(ioc, false, NULL);
- qio_channel_attach_aio_context(ioc, aio_context);
- }
} else {
error_setg(errp, "Server does not support STARTTLS");
return -EINVAL;
@@ -1026,7 +1021,7 @@ int nbd_receive_negotiate(QIOChannel *ioc,
QCryptoTLSCreds *tlscreds,
assert(info->name && strlen(info->name) <= NBD_MAX_STRING_SIZE);
trace_nbd_receive_negotiate_name(info->name);
- result = nbd_start_negotiate(NULL, ioc, tlscreds, hostname, outioc,
+ result = nbd_start_negotiate(ioc, tlscreds, hostname, outioc,
info->structured_reply, &zeroes, errp);
if (result < 0) {
return result;
@@ -1149,7 +1144,7 @@ int nbd_receive_export_list(QIOChannel *ioc,
QCryptoTLSCreds *tlscreds,
QIOChannel *sioc = NULL;
*info = NULL;
- result = nbd_start_negotiate(NULL, ioc, tlscreds, hostname, &sioc, true,
+ result = nbd_start_negotiate(ioc, tlscreds, hostname, &sioc, true,
NULL, errp);
if (tlscreds && sioc) {
ioc = sioc;
--
2.41.0
- [PULL 00/13] NBD patches through 2023-09-07, Eric Blake, 2023/09/07
- [PULL 01/13] qemu-iotests/197: use more generic commands for formats other than qcow2, Eric Blake, 2023/09/07
- [PULL 02/13] nbd: drop unused nbd_receive_negotiate() aio_context argument, Eric Blake, 2023/09/07
- [PULL 04/13] io: check there are no qio_channel_yield() coroutines during ->finalize(), Eric Blake, 2023/09/07
- [PULL 03/13] nbd: drop unused nbd_start_negotiate() aio_context argument,
Eric Blake <=
- [PULL 07/13] qemu-nbd: improve error message for dup2 error, Eric Blake, 2023/09/07
- [PULL 05/13] io: follow coroutine AioContext in qio_channel_yield(), Eric Blake, 2023/09/07
- [PULL 06/13] util/iov: Avoid dynamic stack allocation, Eric Blake, 2023/09/07
- [PULL 08/13] qemu-nbd: define struct NbdClientOpts when HAVE_NBD_DEVICE is not defined, Eric Blake, 2023/09/07
- [PULL 09/13] qemu-nbd: move srcpath into struct NbdClientOpts, Eric Blake, 2023/09/07
- [PULL 10/13] qemu-nbd: put saddr into into struct NbdClientOpts, Eric Blake, 2023/09/07
- [PULL 11/13] qemu-nbd: invent nbd_client_release_pipe() helper, Eric Blake, 2023/09/07
- [PULL 13/13] qemu-nbd: document -v behavior in respect to --fork in man, Eric Blake, 2023/09/07
- [PULL 12/13] qemu-nbd: Restore "qemu-nbd -v --fork" output, Eric Blake, 2023/09/07