qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] blkdebug: ignore invalid rules in non-coroutine context


From: Paolo Bonzini
Subject: Re: [PATCH] blkdebug: ignore invalid rules in non-coroutine context
Date: Thu, 13 Oct 2022 17:41:03 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]