aboutsummaryrefslogtreecommitdiff
path: root/include/block
diff options
context:
space:
mode:
authorSam Li <faithilikerun@gmail.com>2023-05-08 12:55:30 +0800
committerStefan Hajnoczi <stefanha@redhat.com>2023-05-15 08:17:03 -0400
commit774c726ceb2a3aa039dc20f0b51c9d36a2c6760d (patch)
tree72328bd3cc6e0296e6daecc277646aafa3deb9c1 /include/block
parent50c4bcd496d536e6b2693fb6258a9f447c5e33ae (diff)
downloadqemu-774c726ceb2a3aa039dc20f0b51c9d36a2c6760d.zip
qemu-774c726ceb2a3aa039dc20f0b51c9d36a2c6760d.tar.gz
qemu-774c726ceb2a3aa039dc20f0b51c9d36a2c6760d.tar.bz2
block: add zoned BlockDriver check to block layer
Putting zoned/non-zoned BlockDrivers on top of each other is not allowed. Signed-off-by: Sam Li <faithilikerun@gmail.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Dmitry Fomichev <dmitry.fomichev@wdc.com> Acked-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 20230508045533.175575-6-faithilikerun@gmail.com Message-id: 20230324090605.28361-6-faithilikerun@gmail.com [Adjust commit message prefix as suggested by Philippe Mathieu-Daudé <philmd@linaro.org> and clarify that the check is about zoned BlockDrivers. --Stefan] Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include/block')
-rw-r--r--include/block/block_int-common.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/block/block_int-common.h b/include/block/block_int-common.h
index b2612f0..e6975d3 100644
--- a/include/block/block_int-common.h
+++ b/include/block/block_int-common.h
@@ -138,6 +138,11 @@ struct BlockDriver {
bool is_format;
/*
+ * Set to true if the BlockDriver supports zoned children.
+ */
+ bool supports_zoned_children;
+
+ /*
* Drivers not implementing bdrv_parse_filename nor bdrv_open should have
* this field set to true, except ones that are defined only by their
* child's bs.