[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 28/50] include/block/blockjob_int.h: split header into I/O and GS
From: |
Kevin Wolf |
Subject: |
[PULL 28/50] include/block/blockjob_int.h: split header into I/O and GS API |
Date: |
Fri, 4 Mar 2022 17:46:49 +0100 |
From: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Since the I/O functions are not many, keep a single file.
Also split the function pointers in BlockJobDriver.
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20220303151616.325444-16-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
include/block/blockjob_int.h | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/include/block/blockjob_int.h b/include/block/blockjob_int.h
index 6633d83da2..6bd9ae2b20 100644
--- a/include/block/blockjob_int.h
+++ b/include/block/blockjob_int.h
@@ -38,6 +38,13 @@ struct BlockJobDriver {
/** Generic JobDriver callbacks and settings */
JobDriver job_driver;
+ /*
+ * I/O API functions. These functions are thread-safe.
+ *
+ * See include/block/block-io.h for more information about
+ * the I/O API.
+ */
+
/*
* Returns whether the job has pending requests for the child or will
* submit new requests before the next pause point. This callback is polled
@@ -46,6 +53,13 @@ struct BlockJobDriver {
*/
bool (*drained_poll)(BlockJob *job);
+ /*
+ * Global state (GS) API. These functions run under the BQL.
+ *
+ * See include/block/block-global-state.h for more information about
+ * the GS API.
+ */
+
/*
* If the callback is not NULL, it will be invoked before the job is
* resumed in a new AioContext. This is the place to move any resources
@@ -56,6 +70,13 @@ struct BlockJobDriver {
void (*set_speed)(BlockJob *job, int64_t speed);
};
+/*
+ * 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_create:
* @job_id: The id of the newly-created job, or %NULL to have one
@@ -98,6 +119,13 @@ void block_job_free(Job *job);
*/
void block_job_user_resume(Job *job);
+/*
+ * I/O API functions. These functions are thread-safe.
+ *
+ * See include/block/block-io.h for more information about
+ * the I/O API.
+ */
+
/**
* block_job_ratelimit_get_delay:
*
--
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 <=
[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, 2022/03/04
[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