qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH for-7.1 5/8] nbd: use a QemuMutex to synchronize reconnection with coroutines
Date: Wed, 13 Apr 2022 22:16:05 +0200	[thread overview]
Message-ID: <7a7c0e0c-2e17-c1e5-4afe-a601cf77b46b@redhat.com> (raw)
In-Reply-To: <20220413155534.otfxvsfzhgasefmw@redhat.com>

On 4/13/22 17:55, Eric Blake wrote:
>> -    g_assert(qemu_in_coroutine());
> Why is this assert dropped?  Is it because we've marked the function
> with coroutine_fn?  If so, should we drop it earlier in the series,
> when you added the label?

The label doesn't guarantee much, but in this case it's pretty clear-cut 
that we must be in a coroutine, the code just doesn't make sense otherwise.

We're also about to take a CoMutex (and before the patch we had already 
taken it) so if anywhere the place for the assertion would be 
qemu_co_mutex_lock().

> Otherwise, the patch makes sense to me.



  reply	other threads:[~2022-04-13 20:17 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-12 19:41 [PATCH for-7.1 0/8] nbd: actually make s->state thread-safe Paolo Bonzini
2022-04-12 19:41 ` [PATCH for-7.1 1/8] nbd: actually implement reply_possible safeguard Paolo Bonzini
2022-04-12 22:05   ` Eric Blake
2022-04-13  7:30     ` Paolo Bonzini
2022-04-12 19:41 ` [PATCH for-7.1 2/8] nbd: mark more coroutine_fns Paolo Bonzini
2022-04-13 12:25   ` Eric Blake
2022-04-13 20:12     ` Paolo Bonzini
2022-04-12 19:41 ` [PATCH for-7.1 3/8] nbd: remove peppering of nbd_client_connected Paolo Bonzini
2022-04-13 12:48   ` Eric Blake
2022-04-12 19:42 ` [PATCH for-7.1 4/8] nbd: keep send_mutex/free_sema handling outside nbd_co_do_establish_connection Paolo Bonzini
2022-04-13 15:42   ` Eric Blake
2022-04-12 19:42 ` [PATCH for-7.1 5/8] nbd: use a QemuMutex to synchronize reconnection with coroutines Paolo Bonzini
2022-04-13  7:35   ` Paolo Bonzini
2022-04-13 15:55   ` Eric Blake
2022-04-13 20:16     ` Paolo Bonzini [this message]
2022-04-12 19:42 ` [PATCH for-7.1 6/8] nbd: move s->state under requests_lock Paolo Bonzini
2022-04-13 16:23   ` Eric Blake
2022-04-13 20:21     ` Paolo Bonzini
2022-04-12 19:42 ` [PATCH for-7.1 7/8] nbd: take receive_mutex when reading requests[].receiving Paolo Bonzini
2022-04-13 21:20   ` Eric Blake
2022-04-12 19:42 ` [PATCH for-7.1 8/8] nbd: document what is protected by the CoMutexes Paolo Bonzini
2022-04-13 21:22   ` 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=7a7c0e0c-2e17-c1e5-4afe-a601cf77b46b@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=eblake@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).