From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org, mreitz@redhat.com, kwolf@redhat.com,
eblake@redhat.com, rvkagan@yandex-team.ru, den@openvz.org
Subject: DROP THIS Re: [PATCH 00/14] nbd: move reconnect-thread to separate file
Date: Thu, 8 Apr 2021 13:03:55 +0300 [thread overview]
Message-ID: <13074b0f-3b83-8db5-2ef4-a5e0060d15cc@virtuozzo.com> (raw)
In-Reply-To: <20210407104637.36033-1-vsementsov@virtuozzo.com>
07.04.2021 13:46, Vladimir Sementsov-Ogievskiy wrote:
> Hi all!
>
> There are problems with nbd driver:
>
> - nbd reconnect is cancelled on drain, which is bad as Roman describes
> in his "[PATCH 0/7] block/nbd: decouple reconnect from drain"
> - nbd driver is too complicated around drained sections and aio context
> switch. It's nearly impossible to follow all the logic, including
> abuse of bs->in_flight, which is temporary decreased in some places
> (like nbd_read_eof()). Additional reconnect thread and two different
> state machines (we have BDRVNBDState::state and
> BDRVNBDState::connect_thread->state) doesn't make things simpler :)
>
> So, I have a plan:
>
> 1. Move nbd negotiation to connect_thread
>
> 2. Do receive NBD replies in request coroutines, not in connection_co
>
> At this point we can drop connection_co, and when we don't have
> endless running coroutine, NBD driver becomes a usual block driver,
> and we can drop abuse of bs->in_flight, and probably drop most of
> complicated logic around drained section and aio context switch in
> nbd driver.
>
> 3. Still, as Roman describes, with [2] we loose a possibility to
> reconnect immediately when connection breaks (with current code we
> have endless read in reconnect_co, but actually for this to work
> keep-alive should be setup correctly). So, we'll need to reinvent it,
> checking connection periodically by timeout, with help of getsockopt
> or just sending a kind of PING request (zero-length READ or something
> like this).
>
> And this series a kind of preparation. The main point of it is moving
> connect-thread to a separate file.
>
Finally I don't like it. I'm in progress of creating new series to substitute this one, so don't waste your time on review.
--
Best regards,
Vladimir
prev parent reply other threads:[~2021-04-08 10:05 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-07 10:46 [PATCH 00/14] nbd: move reconnect-thread to separate file Vladimir Sementsov-Ogievskiy
2021-04-07 10:46 ` [PATCH 01/14] block/nbd: BDRVNBDState: drop unused connect_err Vladimir Sementsov-Ogievskiy
2021-04-07 11:13 ` Roman Kagan
2021-04-07 10:46 ` [PATCH 02/14] block/nbd: nbd_co_establish_connection(): drop unused errp Vladimir Sementsov-Ogievskiy
2021-04-07 11:28 ` Roman Kagan
2021-04-07 10:46 ` [PATCH 03/14] block/nbd: drop unused NBDConnectThread::err field Vladimir Sementsov-Ogievskiy
2021-04-07 11:42 ` Roman Kagan
2021-04-07 11:55 ` Vladimir Sementsov-Ogievskiy
2021-04-07 10:46 ` [PATCH 04/14] block/nbd: split connect_thread_cb() out of connect_thread_func() Vladimir Sementsov-Ogievskiy
2021-04-07 10:46 ` [PATCH 05/14] block/nbd: rename NBDConnectThread to NBDConnectCB Vladimir Sementsov-Ogievskiy
2021-04-07 10:46 ` [PATCH 06/14] block/nbd: further segregation of connect-thread Vladimir Sementsov-Ogievskiy
2021-04-08 10:44 ` Roman Kagan
2021-04-07 10:46 ` [PATCH 07/14] block/nbd: drop nbd_free_connect_thread() Vladimir Sementsov-Ogievskiy
2021-04-07 10:46 ` [PATCH 08/14] block/nbd: move nbd connect-thread to nbd/client-connect.c Vladimir Sementsov-Ogievskiy
2021-04-07 10:46 ` [PATCH 09/14] block/nbd: NBDConnectCB: drop bh_* fields Vladimir Sementsov-Ogievskiy
2021-04-07 10:46 ` [PATCH 10/14] block/nbd: move wait_connect field under mutex protection Vladimir Sementsov-Ogievskiy
2021-04-07 10:46 ` [PATCH 11/14] block/nbd: refactor connect_bh() Vladimir Sementsov-Ogievskiy
2021-04-07 10:46 ` [PATCH 12/14] block/nbd: refactor nbd_co_establish_connection Vladimir Sementsov-Ogievskiy
2021-04-07 10:46 ` [PATCH 13/14] block/nbd: nbd_co_establish_connection_cancel(): rename wake to do_wake Vladimir Sementsov-Ogievskiy
2021-04-07 10:46 ` [PATCH 14/14] block/nbd: drop thr->state Vladimir Sementsov-Ogievskiy
2021-04-08 10:03 ` Vladimir Sementsov-Ogievskiy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=13074b0f-3b83-8db5-2ef4-a5e0060d15cc@virtuozzo.com \
--to=vsementsov@virtuozzo.com \
--cc=den@openvz.org \
--cc=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=rvkagan@yandex-team.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).