diff options
author | Sam Li <faithilikerun@gmail.com> | 2023-05-08 12:55:28 +0800 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2023-05-15 08:17:03 -0400 |
commit | 6d43eaa39647507563017590b090b2e2b10aed2d (patch) | |
tree | 5d59c499aaeecaa226010c25d84be010f1103661 /job-qmp.c | |
parent | a735b56e49be6f227f3f33be837a74c069441a48 (diff) | |
download | qemu-6d43eaa39647507563017590b090b2e2b10aed2d.zip qemu-6d43eaa39647507563017590b090b2e2b10aed2d.tar.gz qemu-6d43eaa39647507563017590b090b2e2b10aed2d.tar.bz2 |
block/block-backend: add block layer APIs resembling Linux ZonedBlockDevice ioctls
Add zoned device option to host_device BlockDriver. It will be presented only
for zoned host block devices. By adding zone management operations to the
host_block_device BlockDriver, users can use the new block layer APIs
including Report Zone and four zone management operations
(open, close, finish, reset, reset_all).
Qemu-io uses the new APIs to perform zoned storage commands of the device:
zone_report(zrp), zone_open(zo), zone_close(zc), zone_reset(zrs),
zone_finish(zf).
For example, to test zone_report, use following command:
$ ./build/qemu-io --image-opts -n driver=host_device, filename=/dev/nullb0
-c "zrp offset nr_zones"
Signed-off-by: Sam Li <faithilikerun@gmail.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.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-4-faithilikerun@gmail.com
Message-id: 20230324090605.28361-4-faithilikerun@gmail.com
[Adjust commit message prefix as suggested by Philippe Mathieu-Daudé
<philmd@linaro.org> and remove spurious ret = -errno in
raw_co_zone_mgmt().
--Stefan]
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'job-qmp.c')
0 files changed, 0 insertions, 0 deletions