[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v18 0/8] Add support for zoned device
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v18 0/8] Add support for zoned device |
Date: |
Fri, 24 Mar 2023 12:26:04 +0100 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 |
Hi Sam,
On 24/3/23 10:05, Sam Li wrote:
Zoned Block Devices (ZBDs) devide the LBA space to block regions called zones
that are larger than the LBA size. It can only allow sequential writes, which
reduces write amplification in SSD, leading to higher throughput and increased
capacity. More details about ZBDs can be found at:
https://zonedstorage.io/docs/introduction/zoned-storage
The zoned device support aims to let guests (virtual machines) access zoned
storage devices on the host (hypervisor) through a virtio-blk device. This
involves extending QEMU's block layer and virtio-blk emulation code. In its
current status, the virtio-blk device is not aware of ZBDs but the guest sees
host-managed drives as regular drive that will runs correctly under the most
common write workloads.
This patch series extend the block layer APIs with the minimum set of zoned
commands that are necessary to support zoned devices. The commands are - Report
Zones, four zone operations and Zone Append.
There has been a debate on whethre introducing new zoned_host_device BlockDriver
specifically for zoned devices. In the end, it's been decided to stick to
existing host_device BlockDriver interface by only adding new zoned operations
inside it. The benefit of that is to avoid further changes - one example is
command line syntax - to the applications like Libvirt using QEMU zoned
emulation.
It can be tested on a null_blk device using qemu-io or qemu-iotests. For
example, to test zone report using qemu-io:
$ path/to/qemu-io --image-opts -n driver=host_device,filename=/dev/nullb0
-c "zrp offset nr_zones"
Sorry to jump late, but the patch subject prefixes are a bit confusing.
Some suggestions:
Sam Li (8):
include: add zoned device structs
block/block-common: ...
file-posix: introduce helper functions for sysfs attributes
block/file-posix: ...
block: add block layer APIs resembling Linux ZonedBlockDevice ioctls
block/block-backend: ...
raw-format: add zone operations to pass through requests
block/raw-format: ...
config: add check to block layer
block: ...
qemu-iotests: test new zone operations
iotests: ...
block: add some trace events for new block layer APIs
I'd squash that with patch #4 "block/raw-format: add zone operations to
pass through requests".
Regards,
Phil.
docs/zoned-storage: add zoned device documentation
block.c | 19 ++
block/block-backend.c | 133 ++++++++
block/file-posix.c | 444 +++++++++++++++++++++++--
block/io.c | 41 +++
block/raw-format.c | 18 +
block/trace-events | 2 +
docs/devel/zoned-storage.rst | 43 +++
docs/system/qemu-block-drivers.rst.inc | 6 +
include/block/block-common.h | 43 +++
include/block/block-io.h | 9 +
include/block/block_int-common.h | 29 ++
include/block/raw-aio.h | 6 +-
include/sysemu/block-backend-io.h | 18 +
meson.build | 4 +
qemu-io-cmds.c | 149 +++++++++
tests/qemu-iotests/tests/zoned | 89 +++++
tests/qemu-iotests/tests/zoned.out | 53 +++
17 files changed, 1069 insertions(+), 37 deletions(-)
create mode 100644 docs/devel/zoned-storage.rst
create mode 100755 tests/qemu-iotests/tests/zoned
create mode 100644 tests/qemu-iotests/tests/zoned.out
- [PATCH v18 0/8] Add support for zoned device, Sam Li, 2023/03/24
- [PATCH v18 1/8] include: add zoned device structs, Sam Li, 2023/03/24
- [PATCH v18 4/8] raw-format: add zone operations to pass through requests, Sam Li, 2023/03/24
- [PATCH v18 8/8] docs/zoned-storage: add zoned device documentation, Sam Li, 2023/03/24
- [PATCH v18 7/8] block: add some trace events for new block layer APIs, Sam Li, 2023/03/24
- [PATCH v18 3/8] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls, Sam Li, 2023/03/24
- [PATCH v18 2/8] file-posix: introduce helper functions for sysfs attributes, Sam Li, 2023/03/24
- [PATCH v18 6/8] qemu-iotests: test new zone operations, Sam Li, 2023/03/24
- [PATCH v18 5/8] config: add check to block layer, Sam Li, 2023/03/24
- Re: [PATCH v18 0/8] Add support for zoned device,
Philippe Mathieu-Daudé <=