qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH 02/26] qcow2: remove incorrect coroutine_fn annotations


From: Paolo Bonzini
Subject: Re: [PATCH 02/26] qcow2: remove incorrect coroutine_fn annotations
Date: Wed, 27 Apr 2022 14:36:22 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0

On 4/21/22 12:24, Stefan Hajnoczi wrote:
-int coroutine_fn qcow2_flush_caches(BlockDriverState *bs)
+int qcow2_flush_caches(BlockDriverState *bs)
  {
      int ret = qcow2_write_caches(bs);

Both of these eventually hit qcow2_cache_write, which is not marked
coroutine, so these should not be either.

coroutine_fn may call non-coroutine_fn, so this alone is not a reason
for removing it from qcow2_write_caches().

There must be a call chain where qcow2_write_caches() and
qcow2_flush_caches() are is invoked from outside coroutine_fn.

The main problematic caller is qcow2_inactivate(), which calls these functions via qcow2_mark_clean(). Another one is update_ext_header_and_dir(), called by qcow2_store_persistent_dirty_bitmaps(), called by qcow2_inactivate().

Converting inactivate to run in coroutine context would help.

Paolo



reply via email to

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