aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorEmanuele Giuseppe Esposito <eesposit@redhat.com>2022-03-03 10:15:52 -0500
committerKevin Wolf <kwolf@redhat.com>2022-03-04 18:18:25 +0100
commita2c4c3b19bb2453008dfb5efdb35be0258b4cb2b (patch)
tree6f725d067279704968058a6f5185492f0eecd2b7 /block
parent8cc5882c7fe0759f856b2f97a08816353227e8f7 (diff)
downloadqemu-a2c4c3b19bb2453008dfb5efdb35be0258b4cb2b.zip
qemu-a2c4c3b19bb2453008dfb5efdb35be0258b4cb2b.tar.gz
qemu-a2c4c3b19bb2453008dfb5efdb35be0258b4cb2b.tar.bz2
include/sysemu/block-backend: split header into I/O and global state (GS) API
Similarly to the previous patches, split block-backend.h in block-backend-io.h and block-backend-global-state.h In addition, remove "block/block.h" include as it seems it is not necessary anymore, together with "qemu/iov.h" block-backend-common.h contains the structures shared between the two headers, and the functions that can't be categorized as I/O or global state. Assertions are added in the next patch. Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Message-Id: <20220303151616.325444-8-eesposit@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/block-backend.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/block/block-backend.c b/block/block-backend.c
index 98bfcd5..462e18f 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -79,6 +79,7 @@ struct BlockBackend {
bool allow_aio_context_change;
bool allow_write_beyond_eof;
+ /* Protected by BQL */
NotifierList remove_bs_notifiers, insert_bs_notifiers;
QLIST_HEAD(, BlockBackendAioNotifier) aio_notifiers;
@@ -111,12 +112,14 @@ static const AIOCBInfo block_backend_aiocb_info = {
static void drive_info_del(DriveInfo *dinfo);
static BlockBackend *bdrv_first_blk(BlockDriverState *bs);
-/* All BlockBackends */
+/* All BlockBackends. Protected by BQL. */
static QTAILQ_HEAD(, BlockBackend) block_backends =
QTAILQ_HEAD_INITIALIZER(block_backends);
-/* All BlockBackends referenced by the monitor and which are iterated through by
- * blk_next() */
+/*
+ * All BlockBackends referenced by the monitor and which are iterated through by
+ * blk_next(). Protected by BQL.
+ */
static QTAILQ_HEAD(, BlockBackend) monitor_block_backends =
QTAILQ_HEAD_INITIALIZER(monitor_block_backends);