[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 24/32] block/nbd: don't touch s->sioc in nbd_teardown_connecti
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[PATCH v4 24/32] block/nbd: don't touch s->sioc in nbd_teardown_connection() |
Date: |
Thu, 10 Jun 2021 13:07:54 +0300 |
Negotiation during reconnect is now done in a thread, and s->sioc is
not available during negotiation. Negotiation in thread will be
cancelled by nbd_client_connection_release() called from
nbd_clear_bdrvstate(). So, we don't need this code chunk anymore.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
---
block/nbd.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/block/nbd.c b/block/nbd.c
index 3114716444..2abcedd464 100644
--- a/block/nbd.c
+++ b/block/nbd.c
@@ -280,10 +280,6 @@ static void nbd_teardown_connection(BlockDriverState *bs)
if (s->ioc) {
/* finish any pending coroutines */
qio_channel_shutdown(s->ioc, QIO_CHANNEL_SHUTDOWN_BOTH, NULL);
- } else if (s->sioc) {
- /* abort negotiation */
- qio_channel_shutdown(QIO_CHANNEL(s->sioc), QIO_CHANNEL_SHUTDOWN_BOTH,
- NULL);
}
s->state = NBD_CLIENT_QUIT;
--
2.29.2
- Re: [PATCH v4 21/32] nbd/client-connection: shutdown connection on release, (continued)
- [PATCH v4 14/32] block/nbd: rename NBDConnectThread to NBDClientConnection, Vladimir Sementsov-Ogievskiy, 2021/06/10
- [PATCH v4 27/32] block-coroutine-wrapper: allow non bdrv_ prefix, Vladimir Sementsov-Ogievskiy, 2021/06/10
- [PATCH v4 26/32] nbd/client-connection: return only one io channel, Vladimir Sementsov-Ogievskiy, 2021/06/10
- [PATCH v4 25/32] block/nbd: drop BDRVNBDState::sioc, Vladimir Sementsov-Ogievskiy, 2021/06/10
- [PATCH v4 16/32] block/nbd: introduce nbd_client_connection_release(), Vladimir Sementsov-Ogievskiy, 2021/06/10
- [PATCH v4 23/32] block/nbd: use negotiation of NBDClientConnection, Vladimir Sementsov-Ogievskiy, 2021/06/10
- [PATCH v4 22/32] block/nbd: split nbd_handle_updated_info out of nbd_client_handshake(), Vladimir Sementsov-Ogievskiy, 2021/06/10
- [PATCH v4 30/32] block/nbd: reuse nbd_co_do_establish_connection() in nbd_open(), Vladimir Sementsov-Ogievskiy, 2021/06/10
- [PATCH v4 24/32] block/nbd: don't touch s->sioc in nbd_teardown_connection(),
Vladimir Sementsov-Ogievskiy <=
- [PATCH v4 29/32] nbd/client-connection: add option for non-blocking connection attempt, Vladimir Sementsov-Ogievskiy, 2021/06/10
- [PATCH v4 28/32] block/nbd: split nbd_co_do_establish_connection out of nbd_reconnect_attempt, Vladimir Sementsov-Ogievskiy, 2021/06/10
- [PATCH v4 31/32] block/nbd: add nbd_client_connected() helper, Vladimir Sementsov-Ogievskiy, 2021/06/10
- [PATCH v4 32/32] block/nbd: safer transition to receiving request, Vladimir Sementsov-Ogievskiy, 2021/06/10
- Re: [PATCH v4 00/32] block/nbd: rework client connection, Eric Blake, 2021/06/11