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 <[email protected]> > Reviewed-by: Hannes Reinecke <[email protected]> > --- > 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 <[email protected]>
signature.asc
Description: PGP signature
