From 774c726ceb2a3aa039dc20f0b51c9d36a2c6760d Mon Sep 17 00:00:00 2001 From: Sam Li Date: Mon, 8 May 2023 12:55:30 +0800 Subject: block: add zoned BlockDriver check to block layer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Putting zoned/non-zoned BlockDrivers on top of each other is not allowed. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi Reviewed-by: Hannes Reinecke Reviewed-by: Dmitry Fomichev Acked-by: Kevin Wolf Signed-off-by: Stefan Hajnoczi 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é and clarify that the check is about zoned BlockDrivers. --Stefan] Signed-off-by: Stefan Hajnoczi --- include/block/block_int-common.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') 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. -- cgit v1.1