[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 19/20] docs/zoned-storage:add zoned emulation use case
From: |
Stefan Hajnoczi |
Subject: |
[PULL 19/20] docs/zoned-storage:add zoned emulation use case |
Date: |
Thu, 20 Apr 2023 08:09:47 -0400 |
From: Sam Li <faithilikerun@gmail.com>
Add the documentation about the example of using virtio-blk driver
to pass the zoned block devices through to the guest.
Signed-off-by: Sam Li <faithilikerun@gmail.com>
Message-id: 20230407082528.18841-6-faithilikerun@gmail.com
[Fix Sphinx indentation error by turning command-lines into
pre-formatted text.
--Stefan]
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
docs/devel/zoned-storage.rst | 25 ++++++++++++++++++++++---
1 file changed, 22 insertions(+), 3 deletions(-)
diff --git a/docs/devel/zoned-storage.rst b/docs/devel/zoned-storage.rst
index 6a36133e51..e02500c8a3 100644
--- a/docs/devel/zoned-storage.rst
+++ b/docs/devel/zoned-storage.rst
@@ -38,6 +38,25 @@ When the BlockBackend's BlockLimits model reports a zoned
storage device, users
like the virtio-blk emulation or the qemu-io-cmds.c utility can use block layer
APIs for zoned storage emulation or testing.
-For example, to test zone_report on a null_blk device using qemu-io is:
-$ path/to/qemu-io --image-opts -n driver=host_device,filename=/dev/nullb0
--c "zrp offset nr_zones"
+For example, to test zone_report on a null_blk device using qemu-io is::
+
+ $ path/to/qemu-io --image-opts -n driver=host_device,filename=/dev/nullb0 -c
"zrp offset nr_zones"
+
+To expose the host's zoned block device through virtio-blk, the command line
+can be (includes the -device parameter)::
+
+ -blockdev
node-name=drive0,driver=host_device,filename=/dev/nullb0,cache.direct=on \
+ -device virtio-blk-pci,drive=drive0
+
+Or only use the -drive parameter::
+
+ -driver driver=host_device,file=/dev/nullb0,if=virtio,cache.direct=on
+
+Additionally, QEMU has several ways of supporting zoned storage, including:
+(1) Using virtio-scsi: --device scsi-block allows for the passing through of
+SCSI ZBC devices, enabling the attachment of ZBC or ZAC HDDs to QEMU.
+(2) PCI device pass-through: While NVMe ZNS emulation is available for testing
+purposes, it cannot yet pass through a zoned device from the host. To pass on
+the NVMe ZNS device to the guest, use VFIO PCI pass the entire NVMe PCI adapter
+through to the guest. Likewise, an HDD HBA can be passed on to QEMU all HDDs
+attached to the HBA.
--
2.39.2
- [PULL 12/20] block: introduce zone append write for zoned devices, (continued)
- [PULL 12/20] block: introduce zone append write for zoned devices, Stefan Hajnoczi, 2023/04/20
- [PULL 14/20] block: add some trace events for zone append, Stefan Hajnoczi, 2023/04/20
- [PULL 15/20] include: update virtio_blk headers to v6.3-rc1, Stefan Hajnoczi, 2023/04/20
- [PULL 20/20] tracing: install trace events file only if necessary, Stefan Hajnoczi, 2023/04/20
- [PULL 08/20] docs/zoned-storage: add zoned device documentation, Stefan Hajnoczi, 2023/04/20
- [PULL 18/20] virtio-blk: add some trace events for zoned emulation, Stefan Hajnoczi, 2023/04/20
- [PULL 11/20] file-posix: add tracking of the zone write pointers, Stefan Hajnoczi, 2023/04/20
- [PULL 13/20] qemu-iotests: test zone append operation, Stefan Hajnoczi, 2023/04/20
- [PULL 16/20] virtio-blk: add zoned storage emulation for zoned devices, Stefan Hajnoczi, 2023/04/20
- [PULL 17/20] block: add accounting for zone append operation, Stefan Hajnoczi, 2023/04/20
- [PULL 19/20] docs/zoned-storage:add zoned emulation use case,
Stefan Hajnoczi <=
- Re: [PULL 00/20] Block patches, Richard Henderson, 2023/04/21