Skip to content

Commit

Permalink
include/block/block_int: split header into I/O and global state API
Browse files Browse the repository at this point in the history
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 <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
  • Loading branch information
esposem authored and kevmw committed Mar 4, 2022
1 parent 862fded commit ebc2752
Show file tree
Hide file tree
Showing 5 changed files with 1,679 additions and 1,486 deletions.
5 changes: 5 additions & 0 deletions blockdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down
Loading

0 comments on commit ebc2752

Please sign in to comment.