diff options
author | Sam Li <faithilikerun@gmail.com> | 2023-05-08 12:55:27 +0800 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2023-05-15 08:17:03 -0400 |
commit | a735b56e49be6f227f3f33be837a74c069441a48 (patch) | |
tree | 2fced91df1e7013e714ae224c69efd2c7ee32851 /include | |
parent | 72ca800ec5eca1a36a741ce3e878cf675672dc9c (diff) | |
download | qemu-a735b56e49be6f227f3f33be837a74c069441a48.zip qemu-a735b56e49be6f227f3f33be837a74c069441a48.tar.gz qemu-a735b56e49be6f227f3f33be837a74c069441a48.tar.bz2 |
block/file-posix: introduce helper functions for sysfs attributes
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 <faithilikerun@gmail.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
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-3-faithilikerun@gmail.com
Message-id: 20230324090605.28361-3-faithilikerun@gmail.com
[Adjust commit message prefix as suggested by Philippe Mathieu-Daudé
<philmd@linaro.org>.
--Stefan]
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/block/block_int-common.h | 3 |
1 files changed, 3 insertions, 0 deletions
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; |