qemu-block
[Top][All Lists]
Advanced

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

Re: [RFC PATCH v2 18/25] block/coroutines: I/O API


From: Paolo Bonzini
Subject: Re: [RFC PATCH v2 18/25] block/coroutines: I/O API
Date: Thu, 7 Oct 2021 13:52:25 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0

On 05/10/21 16:32, Emanuele Giuseppe Esposito wrote:
block coroutines functions run in different aiocontext, and are
not protected by the BQL. Therefore are I/O.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
---
  block/coroutines.h | 6 ++++++
  1 file changed, 6 insertions(+)

diff --git a/block/coroutines.h b/block/coroutines.h
index 514d169d23..105e0ce2a9 100644
--- a/block/coroutines.h
+++ b/block/coroutines.h
@@ -27,6 +27,12 @@
#include "block/block_int.h" +/*
+ * I/O API functions. These functions are thread-safe, and therefore
+ * can run in any thread as long as they have called
+ * aio_context_acquire/release().
+ */
+
  int coroutine_fn bdrv_co_check(BlockDriverState *bs,
                                 BdrvCheckResult *res, BdrvCheckMode fix);
  int coroutine_fn bdrv_co_invalidate_cache(BlockDriverState *bs, Error **errp);


Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

except for the same comment about "they" that was in patch 2.

Paolo




reply via email to

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