From: Paolo Bonzini <pbonzini@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org, kwolf@redhat.com, qemu-block@nongnu.org
Subject: Re: [PATCH] blkdebug: ignore invalid rules in non-coroutine context
Date: Thu, 13 Oct 2022 17:41:03 +0200 [thread overview]
Message-ID: <ae19fc6f-7ff8-87a7-345e-38c0e864f9d1@redhat.com> (raw)
In-Reply-To: <878rljyhs4.fsf@pond.sub.org>
On 10/13/22 15:28, Markus Armbruster wrote:
> Let's have another look at the remaining patch hunk:
>
> @@ -858,7 +864,12 @@ static void blkdebug_debug_event(BlockDriverState *bs, BlkdebugEvent event)
> }
>
> while (actions_count[ACTION_SUSPEND] > 0) {
> - qemu_coroutine_yield();
> + if (qemu_in_coroutine()) {
> + qemu_coroutine_yield();
> + } else {
> + error_report("Non-coroutine event %s cannot suspend\n",
> + BlkdebugEvent_lookup.array[event]);
> + }
> actions_count[ACTION_SUSPEND]--;
> }
> }
>
> If I understand this correctly, the user asked us to suspend, but it now
> turns out suspend doesn't make sense, so we ignore the request.
> Correct?
Yes.
> warn_report()? info_report()?
Sure, warn_report() can work too.
Paolo
next prev parent reply other threads:[~2022-10-13 15:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-13 9:35 [PATCH] blkdebug: ignore invalid rules in non-coroutine context Paolo Bonzini
2022-10-13 10:56 ` Markus Armbruster
2022-10-13 13:06 ` Paolo Bonzini
2022-10-13 13:28 ` Markus Armbruster
2022-10-13 15:41 ` Paolo Bonzini [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-12-15 13:02 Paolo Bonzini
2022-12-15 13:44 ` Kevin Wolf
2023-01-17 15:44 ` Kevin Wolf
2023-01-17 17:21 ` Kevin Wolf
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=ae19fc6f-7ff8-87a7-345e-38c0e864f9d1@redhat.com \
--to=pbonzini@redhat.com \
--cc=armbru@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--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).