mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
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>
This commit is contained in:
parent
6540fd153c
commit
d67066d8bc
14 changed files with 21 additions and 0 deletions
|
@ -95,6 +95,13 @@ struct BlockDriver {
|
|||
* must implement them and return -ENOTSUP.
|
||||
*/
|
||||
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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue