From a735b56e49be6f227f3f33be837a74c069441a48 Mon Sep 17 00:00:00 2001 From: Sam Li Date: Mon, 8 May 2023 12:55:27 +0800 Subject: block/file-posix: introduce helper functions for sysfs attributes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use get_sysfs_str_val() to get the string value of device zoned model. Then get_sysfs_zoned_model() can convert it to BlockZoneModel type of QEMU. Use get_sysfs_long_val() to get the long value of zoned device information. Signed-off-by: Sam Li Reviewed-by: Hannes Reinecke Reviewed-by: Stefan Hajnoczi Reviewed-by: Damien Le Moal Reviewed-by: Dmitry Fomichev Acked-by: Kevin Wolf Signed-off-by: Stefan Hajnoczi Message-id: 20230508045533.175575-3-faithilikerun@gmail.com Message-id: 20230324090605.28361-3-faithilikerun@gmail.com [Adjust commit message prefix as suggested by Philippe Mathieu-Daudé . --Stefan] Signed-off-by: Stefan Hajnoczi --- include/block/block_int-common.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/block/block_int-common.h b/include/block/block_int-common.h index 4909876..c7ca5a8 100644 --- a/include/block/block_int-common.h +++ b/include/block/block_int-common.h @@ -862,6 +862,9 @@ typedef struct BlockLimits { * an explicit monitor command to load the disk inside the guest). */ bool has_variable_length; + + /* device zone model */ + BlockZoneModel zoned; } BlockLimits; typedef struct BdrvOpBlocker BdrvOpBlocker; -- cgit v1.1