[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 31/50] include/block/blockjob.h: global state API
From: |
Kevin Wolf |
Subject: |
[PULL 31/50] include/block/blockjob.h: global state API |
Date: |
Fri, 4 Mar 2022 17:46:52 +0100 |
From: Emanuele Giuseppe Esposito <eesposit@redhat.com>
blockjob functions run always under the BQL lock.
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Message-Id: <20220303151616.325444-19-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
include/block/blockjob.h | 29 ++++++++++++++++++++++-------
1 file changed, 22 insertions(+), 7 deletions(-)
diff --git a/include/block/blockjob.h b/include/block/blockjob.h
index 87fbb3985f..6525e16fd5 100644
--- a/include/block/blockjob.h
+++ b/include/block/blockjob.h
@@ -74,6 +74,13 @@ typedef struct BlockJob {
GSList *nodes;
} BlockJob;
+/*
+ * Global state (GS) API. These functions run under the BQL.
+ *
+ * See include/block/block-global-state.h for more information about
+ * the GS API.
+ */
+
/**
* block_job_next:
* @job: A block job, or %NULL.
@@ -155,6 +162,21 @@ BlockJobInfo *block_job_query(BlockJob *job, Error **errp);
*/
void block_job_iostatus_reset(BlockJob *job);
+/*
+ * block_job_get_aio_context:
+ *
+ * Returns aio context associated with a block job.
+ */
+AioContext *block_job_get_aio_context(BlockJob *job);
+
+
+/*
+ * Common functions that are neither I/O nor Global State.
+ *
+ * See include/block/block-common.h for more information about
+ * the Common API.
+ */
+
/**
* block_job_is_internal:
* @job: The job to determine if it is user-visible or not.
@@ -170,11 +192,4 @@ bool block_job_is_internal(BlockJob *job);
*/
const BlockJobDriver *block_job_driver(BlockJob *job);
-/*
- * block_job_get_aio_context:
- *
- * Returns aio context associated with a block job.
- */
-AioContext *block_job_get_aio_context(BlockJob *job);
-
#endif
--
2.35.1
[PULL 23/50] block.c: assertions to the block layer permissions API, Kevin Wolf, 2022/03/04
[PULL 22/50] IO_CODE and IO_OR_GS_CODE for block-backend I/O API, Kevin Wolf, 2022/03/04
[PULL 25/50] assertions for block_int global state API, Kevin Wolf, 2022/03/04
[PULL 24/50] include/block/block_int: split header into I/O and global state API, Kevin Wolf, 2022/03/04
[PULL 26/50] IO_CODE and IO_OR_GS_CODE for block_int I/O API, Kevin Wolf, 2022/03/04
[PULL 28/50] include/block/blockjob_int.h: split header into I/O and GS API, Kevin Wolf, 2022/03/04
[PULL 29/50] GS and IO CODE macros for blockjob_int.h, Kevin Wolf, 2022/03/04
[PULL 31/50] include/block/blockjob.h: global state API,
Kevin Wolf <=
[PULL 30/50] block.c: add assertions to static functions, Kevin Wolf, 2022/03/04
[PULL 36/50] block/copy-before-write.h: global state API + assertions, Kevin Wolf, 2022/03/04
[PULL 37/50] block/coroutines: I/O and "I/O or GS" API, Kevin Wolf, 2022/03/04
[PULL 38/50] block_int-common.h: split function pointers in BlockDriver, Kevin Wolf, 2022/03/04
[PULL 39/50] block_int-common.h: assertions in the callers of BlockDriver function pointers, Kevin Wolf, 2022/03/04
[PULL 41/50] block_int-common.h: assertions in the callers of BdrvChildClass function pointers, Kevin Wolf, 2022/03/04
[PULL 42/50] block-backend-common.h: split function pointers in BlockDevOps, Kevin Wolf, 2022/03/04
[PULL 44/50] job.h: assertions in the callers of JobDriver function pointers, Kevin Wolf, 2022/03/04
[PULL 40/50] block_int-common.h: split function pointers in BdrvChildClass, Kevin Wolf, 2022/03/04
[PULL 43/50] job.h: split function pointers in JobDriver, Kevin Wolf, 2022/03/04