[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH v2 18/25] block/coroutines: I/O API
From: |
Emanuele Giuseppe Esposito |
Subject: |
[RFC PATCH v2 18/25] block/coroutines: I/O API |
Date: |
Tue, 5 Oct 2021 10:32:08 -0400 |
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);
--
2.27.0
- [RFC PATCH v2 11/25] include/block/blockjob.h: global state API, (continued)
- [RFC PATCH v2 14/25] assertions for blockdev.h global state API, Emanuele Giuseppe Esposito, 2021/10/05
- [RFC PATCH v2 16/25] block/backup-top.h: global state API + assertions, Emanuele Giuseppe Esposito, 2021/10/05
- [RFC PATCH v2 18/25] block/coroutines: I/O API,
Emanuele Giuseppe Esposito <=
- [RFC PATCH v2 17/25] include/block/transactions: global state API + assertions, Emanuele Giuseppe Esposito, 2021/10/05
- [RFC PATCH v2 15/25] include/block/snapshot: global state API + assertions, Emanuele Giuseppe Esposito, 2021/10/05
- [RFC PATCH v2 19/25] block_int-common.h: split function pointers in BlockDriver, Emanuele Giuseppe Esposito, 2021/10/05