|
From: | Paolo Bonzini |
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 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 |
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.
[Prev in Thread] | Current Thread | [Next in Thread] |