[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v14 3/8] block: add block layer APIs resembling Linux ZonedBl
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH v14 3/8] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls |
Date: |
Tue, 20 Dec 2022 15:58:21 -0500 |
On Mon, Dec 19, 2022 at 03:29:14PM +0800, Sam Li wrote:
> Add a new zoned_host_device BlockDriver. The zoned_host_device option
> accepts only zoned host block devices. By adding zone management
> operations in this new 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=zoned_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>
> ---
> block/block-backend.c | 147 ++++++++++++
> block/file-posix.c | 364 ++++++++++++++++++++++++++++++
> block/io.c | 41 ++++
> include/block/block-io.h | 7 +
> include/block/block_int-common.h | 21 ++
> include/block/raw-aio.h | 6 +-
> include/sysemu/block-backend-io.h | 18 ++
> meson.build | 4 +
> qapi/block-core.json | 8 +-
> qemu-io-cmds.c | 149 ++++++++++++
> 10 files changed, 762 insertions(+), 3 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
signature.asc
Description: PGP signature