summaryrefslogtreecommitdiffstats
path: root/include/block
diff options
context:
space:
mode:
authorMax Reitz2020-05-13 13:05:12 +0200
committerKevin Wolf2020-05-18 19:05:25 +0200
commitd67066d8bc01a14f7c9d9b9aeeffb30a10f0e900 (patch)
tree0af8c1dbef89694d6103e874dbf23449c017849a /include/block
parentblock: Mark commit, mirror, blkreplay as filters (diff)
downloadqemu-d67066d8bc01a14f7c9d9b9aeeffb30a10f0e900.tar.gz
qemu-d67066d8bc01a14f7c9d9b9aeeffb30a10f0e900.tar.xz
qemu-d67066d8bc01a14f7c9d9b9aeeffb30a10f0e900.zip
block: Add BlockDriver.is_format
We want to unify child_format and child_file at some point. One of the important things that set format drivers apart from other drivers is that they do not expect other format nodes under them (except in the backing chain), i.e. we must not probe formats inside of formats. That means we need something on which to distinguish format drivers from others, and hence this flag. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Message-Id: <20200513110544.176672-3-mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/block')
-rw-r--r--include/block/block_int.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/block/block_int.h b/include/block/block_int.h
index 7ba8c89036..1c24df53fd 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -96,6 +96,13 @@ struct BlockDriver {
*/
bool is_filter;
/*
+ * Set to true if the BlockDriver is a format driver. Format nodes
+ * generally do not expect their children to be other format nodes
+ * (except for backing files), and so format probing is disabled
+ * on those children.
+ */
+ bool is_format;
+ /*
* Return true if @to_replace can be replaced by a BDS with the
* same data as @bs without it affecting @bs's behavior (that is,
* without it being visible to @bs's parents).