summaryrefslogtreecommitdiffstats
path: root/blockdev.c
diff options
context:
space:
mode:
authorEmanuele Giuseppe Esposito2022-03-03 16:15:56 +0100
committerKevin Wolf2022-03-04 18:18:25 +0100
commitebc2752b08ea238438a45666654cbecf78b021a3 (patch)
treea03fba4f7a586afc968dc8d1d6de6bc92314b514 /blockdev.c
parentblock.c: assertions to the block layer permissions API (diff)
downloadqemu-ebc2752b08ea238438a45666654cbecf78b021a3.tar.gz
qemu-ebc2752b08ea238438a45666654cbecf78b021a3.tar.xz
qemu-ebc2752b08ea238438a45666654cbecf78b021a3.zip
include/block/block_int: split header into I/O and global state API
Similarly to the previous patch, split block_int.h in block_int-io.h and block_int-global-state.h block_int-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-12-eesposit@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'blockdev.c')
-rw-r--r--blockdev.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/blockdev.c b/blockdev.c
index d601ae522e..52078e772f 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -63,6 +63,7 @@
#include "qemu/main-loop.h"
#include "qemu/throttle-options.h"
+/* Protected by BQL */
QTAILQ_HEAD(, BlockDriverState) monitor_bdrv_states =
QTAILQ_HEAD_INITIALIZER(monitor_bdrv_states);
@@ -1175,6 +1176,8 @@ typedef struct BlkActionState BlkActionState;
*
* Only prepare() may fail. In a single transaction, only one of commit() or
* abort() will be called. clean() will always be called if it is present.
+ *
+ * Always run under BQL.
*/
typedef struct BlkActionOps {
size_t instance_size;
@@ -2284,6 +2287,8 @@ static TransactionProperties *get_transaction_properties(
/*
* 'Atomic' group operations. The operations are performed as a set, and if
* any fail then we roll back all operations in the group.
+ *
+ * Always run under BQL.
*/
void qmp_transaction(TransactionActionList *dev_list,
bool has_props,