From: Lukas Straub <lukasstraub2@web.de>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: v.sementsov-og@mail.ru, eblake@redhat.com, qemu-devel@nongnu.org
Subject: Re: [PATCH v2 for-7.1 0/9] nbd: actually make s->state thread-safe
Date: Sat, 16 Apr 2022 19:03:57 +0000 [thread overview]
Message-ID: <20220416190341.561cb3ff@gecko.fritz.box> (raw)
In-Reply-To: <20220414175756.671165-1-pbonzini@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1595 bytes --]
On Thu, 14 Apr 2022 19:57:47 +0200
Paolo Bonzini <pbonzini@redhat.com> wrote:
> The main point of this series is patch 7, which removes the dubious and
> probably wrong use of atomics in block/nbd.c. This in turn is enabled
> mostly by the cleanups in patches 3-5. Together, they introduce a
> QemuMutex that synchronizes the NBD client coroutines, the reconnect_delay
> timer and nbd_cancel_in_flight() as well.
>
> The fixes happen to remove an incorrect use of qemu_co_queue_restart_all
> and qemu_co_enter_next on the s->free_sema CoQueue, which was not guarded
> by s->send_mutex.
>
> The rest is bugfixes, simplifying the code a bit, and extra documentation.
>
> v1->v2:
> - cleaner patch 1
> - fix grammar in patch 4
> - split out patch 6
>
> Paolo Bonzini (9):
> nbd: safeguard against waking up invalid coroutine
> nbd: mark more coroutine_fns
> nbd: remove peppering of nbd_client_connected
> nbd: keep send_mutex/free_sema handling outside
> nbd_co_do_establish_connection
> nbd: use a QemuMutex to synchronize yanking, reconnection and
> coroutines
> nbd: code motion and function renaming
> nbd: move s->state under requests_lock
> nbd: take receive_mutex when reading requests[].receiving
> nbd: document what is protected by the CoMutexes
>
> block/coroutines.h | 4 +-
> block/nbd.c | 298 +++++++++++++++++++++++----------------------
> 2 files changed, 154 insertions(+), 148 deletions(-)
>
For the whole series:
Reviewed-by: Lukas Straub <lukasstraub2@web.de>
Regards,
Lukas
--
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2022-04-16 19:05 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-14 17:57 [PATCH v2 for-7.1 0/9] nbd: actually make s->state thread-safe Paolo Bonzini
2022-04-14 17:57 ` [PATCH v2 for-7.1 1/9] nbd: safeguard against waking up invalid coroutine Paolo Bonzini
2022-04-14 19:02 ` Eric Blake
2022-04-15 9:53 ` Vladimir Sementsov-Ogievskiy
2022-04-14 17:57 ` [PATCH v2 for-7.1 2/9] nbd: mark more coroutine_fns Paolo Bonzini
2022-04-15 10:12 ` Vladimir Sementsov-Ogievskiy
2022-04-14 17:57 ` [PATCH v2 for-7.1 3/9] nbd: remove peppering of nbd_client_connected Paolo Bonzini
2022-04-15 17:01 ` Vladimir Sementsov-Ogievskiy
2022-04-23 8:30 ` Paolo Bonzini
2022-04-14 17:57 ` [PATCH v2 for-7.1 4/9] nbd: keep send_mutex/free_sema handling outside nbd_co_do_establish_connection Paolo Bonzini
2022-04-14 19:11 ` Eric Blake
2022-04-16 11:54 ` Vladimir Sementsov-Ogievskiy
2022-04-23 8:34 ` Paolo Bonzini
2022-04-14 17:57 ` [PATCH v2 for-7.1 5/9] nbd: use a QemuMutex to synchronize yanking, reconnection and coroutines Paolo Bonzini
2022-04-14 19:33 ` Eric Blake
2022-04-16 12:18 ` Vladimir Sementsov-Ogievskiy
2022-04-23 8:37 ` Paolo Bonzini
2022-04-14 17:57 ` [PATCH v2 for-7.1 6/9] nbd: code motion and function renaming Paolo Bonzini
2022-04-14 19:37 ` Eric Blake
2022-04-16 12:37 ` Vladimir Sementsov-Ogievskiy
2022-04-23 8:38 ` Paolo Bonzini
2022-04-14 17:57 ` [PATCH v2 for-7.1 7/9] nbd: move s->state under requests_lock Paolo Bonzini
2022-04-14 19:40 ` Eric Blake
2022-04-16 13:37 ` Vladimir Sementsov-Ogievskiy
2022-04-14 17:57 ` [PATCH v2 for-7.1 8/9] nbd: take receive_mutex when reading requests[].receiving Paolo Bonzini
2022-04-14 19:42 ` Eric Blake
2022-04-16 13:54 ` Vladimir Sementsov-Ogievskiy
2022-04-14 17:57 ` [PATCH v2 for-7.1 9/9] nbd: document what is protected by the CoMutexes Paolo Bonzini
2022-04-14 19:42 ` Eric Blake
2022-04-16 14:00 ` Vladimir Sementsov-Ogievskiy
2022-04-23 8:41 ` Paolo Bonzini
2022-04-16 19:03 ` Lukas Straub [this message]
2022-04-22 20:39 ` [PATCH v2 for-7.1 0/9] nbd: actually make s->state thread-safe Eric Blake
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=20220416190341.561cb3ff@gecko.fritz.box \
--to=lukasstraub2@web.de \
--cc=eblake@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=v.sementsov-og@mail.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).