Message ID | 20220712021345.8530-1-faithilikerun@gmail.com (mailing list archive) |
---|---|
Headers | show |
Series | Add support for zoned device | expand |
Sam Li <faithilikerun@gmail.com> writes: > This patch series adds support for zoned device to virtio-blk emulation. Zoned > Storage can support sequential writes, which reduces write amplification in SSD, > leading to higher write throughput and increased capacity. Forgive me if this has already been discussed, or is explained deeper in the patch series... The commit message sounds like you're extending virtio-blk to optionally emulate zoned storage. Correct? PATCH 1 adds a new block block device driver 'zoned_host_device', and PATCH 9 exposes it in QAPI. This is for passing through a zoned host device, correct?
Markus Armbruster <armbru@redhat.com> 于2022年7月12日周二 13:47写道: > > Sam Li <faithilikerun@gmail.com> writes: > > > This patch series adds support for zoned device to virtio-blk emulation. Zoned > > Storage can support sequential writes, which reduces write amplification in SSD, > > leading to higher write throughput and increased capacity. > > Forgive me if this has already been discussed, or is explained deeper in > the patch series... > > The commit message sounds like you're extending virtio-blk to optionally > emulate zoned storage. Correct? Yes! The main purpose is to emulate zoned storage only for the zoned device files. Right now, QEMU sees those as regular block devices. > PATCH 1 adds a new block block device driver 'zoned_host_device', and > PATCH 9 exposes it in QAPI. This is for passing through a zoned host > device, correct? Yes! It allows the guest os see zoned host device. It is still in development. Maybe the implementations will change later. Best regards, Sam
Sam Li <faithilikerun@gmail.com> writes: > Markus Armbruster <armbru@redhat.com> 于2022年7月12日周二 13:47写道: >> >> Sam Li <faithilikerun@gmail.com> writes: >> >> > This patch series adds support for zoned device to virtio-blk emulation. Zoned >> > Storage can support sequential writes, which reduces write amplification in SSD, >> > leading to higher write throughput and increased capacity. >> >> Forgive me if this has already been discussed, or is explained deeper in >> the patch series... >> >> The commit message sounds like you're extending virtio-blk to optionally >> emulate zoned storage. Correct? > > Yes! The main purpose is to emulate zoned storage only for the zoned > device files. Right now, QEMU sees those as regular block devices. > >> PATCH 1 adds a new block block device driver 'zoned_host_device', and >> PATCH 9 exposes it in QAPI. This is for passing through a zoned host >> device, correct? > > Yes! It allows the guest os see zoned host device. It is still in > development. Maybe the implementations will change later. Your cover letter only mentions the virtio-blk part, not the pass-through part. Please correct that if you need to respin.
On Mon, 11 Jul 2022 at 22:17, Sam Li <faithilikerun@gmail.com> wrote: > > This patch series adds support for zoned device to virtio-blk emulation. Zoned > Storage can support sequential writes, which reduces write amplification in SSD, > leading to higher write throughput and increased capacity. Please use "git rebase -i master" and add "x make" lines after each commit to check that the code still builds after each commit. It is important to order patches so that each commit still builds successfully. That way git-bisect(1) works and patches can be backported/cherry-picked. Stefan
This patch series introduces the concept of zoned storage to the QEMU block layer. Documentation is needed so that users and developers know how to use and maintain this feature. As a minimum, let's document how to pass through zoned block devices on Linux: diff --git a/docs/system/qemu-block-drivers.rst.inc b/docs/system/qemu-block-drivers.rst.inc index dfe5d2293d..f6ba05710a 100644 --- a/docs/system/qemu-block-drivers.rst.inc +++ b/docs/system/qemu-block-drivers.rst.inc @@ -430,6 +430,12 @@ Hard disks you may corrupt your host data (use the ``-snapshot`` command line option or modify the device permissions accordingly). +Zoned block devices + Zoned block devices can be passed through to the guest if the emulated + storage controller supports zoned storage. Use ``--blockdev + zoned_host_device,node-name=drive0,filename=/dev/nullb0`` to pass through + ``/dev/nullb0`` as ``drive0``. + Windows ^^^^^^^ For developers there should be an explanation of the zoned storage APIs and how BlockDrivers declare support. It should also mention the status of pass through (implemented in the zoned_host_device driver) vs zone emulation (not implemented in the QEMU block layer) so developers understand the block layer's zoned storage capabilities. You can add a docs/devel/zoned-storage.rst file to document this or let me know if you want me to write it. Stefan
Stefan Hajnoczi <stefanha@gmail.com> 于2022年7月27日周三 23:06写道: > > This patch series introduces the concept of zoned storage to the QEMU > block layer. Documentation is needed so that users and developers know > how to use and maintain this feature. > > As a minimum, let's document how to pass through zoned block devices on Linux: > > diff --git a/docs/system/qemu-block-drivers.rst.inc > b/docs/system/qemu-block-drivers.rst.inc > index dfe5d2293d..f6ba05710a 100644 > --- a/docs/system/qemu-block-drivers.rst.inc > +++ b/docs/system/qemu-block-drivers.rst.inc > @@ -430,6 +430,12 @@ Hard disks > you may corrupt your host data (use the ``-snapshot`` command > line option or modify the device permissions accordingly). > > +Zoned block devices > + Zoned block devices can be passed through to the guest if the emulated > + storage controller supports zoned storage. Use ``--blockdev > + zoned_host_device,node-name=drive0,filename=/dev/nullb0`` to pass through > + ``/dev/nullb0`` as ``drive0``. > + > Windows > ^^^^^^^ > > For developers there should be an explanation of the zoned storage > APIs and how BlockDrivers declare support. It should also mention the > status of pass through (implemented in the zoned_host_device driver) > vs zone emulation (not implemented in the QEMU block layer) so > developers understand the block layer's zoned storage capabilities. > You can add a docs/devel/zoned-storage.rst file to document this or > let me know if you want me to write it. I will write the document and address the issues in the reviews, which should be in the next revision. Thanks for reviewing! Have a good day! Sam