diff options
| author | Kevin Wolf <kwolf@redhat.com> | 2025-02-04 22:13:52 +0100 |
|---|---|---|
| committer | Kevin Wolf <kwolf@redhat.com> | 2025-02-06 14:26:50 +0100 |
| commit | aec81049c2daa8a97b89e59f03733b21ae0f8c2d (patch) | |
| tree | 3c0bc2cdf864e1b4325a72db74557a14e125ce84 /include | |
| parent | 107c551de0d7bc3aa8e926c557b66b9549616f42 (diff) | |
| download | focaccia-qemu-aec81049c2daa8a97b89e59f03733b21ae0f8c2d.tar.gz focaccia-qemu-aec81049c2daa8a97b89e59f03733b21ae0f8c2d.zip | |
block: Add 'active' field to BlockDeviceInfo
This allows querying from QMP (and also HMP) whether an image is currently active or inactive (in the sense of BDRV_O_INACTIVE). Signed-off-by: Kevin Wolf <kwolf@redhat.com> Acked-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-ID: <20250204211407.381505-2-kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/block/block-global-state.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/block/block-global-state.h b/include/block/block-global-state.h index bd7cecd1cf..a826bf5f78 100644 --- a/include/block/block-global-state.h +++ b/include/block/block-global-state.h @@ -175,6 +175,9 @@ BlockDriverState * GRAPH_RDLOCK check_to_replace_node(BlockDriverState *parent_bs, const char *node_name, Error **errp); + +bool GRAPH_RDLOCK bdrv_is_inactive(BlockDriverState *bs); + int no_coroutine_fn GRAPH_RDLOCK bdrv_activate(BlockDriverState *bs, Error **errp); |