[RFC v5 0/3] Add zoned storage emulation to virtio-blk driver

Sam Li posted 3 patches 1 year, 4 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20221219081644.11790-1-faithilikerun@gmail.com
Maintainers: Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, Raphael Norwitz <raphael.norwitz@nutanix.com>
There is a newer version of this series
hw/block/trace-events                       |   7 +
hw/block/virtio-blk-common.c                |   2 +
hw/block/virtio-blk.c                       | 395 ++++++++++++++++++++
include/standard-headers/linux/virtio_blk.h | 158 +++++++-
4 files changed, 546 insertions(+), 16 deletions(-)
[RFC v5 0/3] Add zoned storage emulation to virtio-blk driver
Posted by Sam Li 1 year, 4 months ago
Note: the virtio-blk headers isn't upstream in the kernel yet therefore
marked as an RFC. More information can be found here:
https://patchwork.kernel.org/project/linux-block/cover/20221030043545.974223-1-dmitry.fomichev@wdc.com/

v5:
- address Stefan's review comments
  * restore the way writing zone append result to buffer
  * fix error checking case and other errands

v4:
- change the way writing zone append request result to buffer
- change zone state, zone type value of virtio_blk_zone_descriptor
- add trace events for new zone APIs

v3:
- use qemuio_from_buffer to write status bit [Stefan]
- avoid using req->elem directly [Stefan]
- fix error checkings and memory leak [Stefan]

v2:
- change units of emulated zone op coresponding to block layer APIs
- modify error checking cases [Stefan, Damien]

v1:
- add zoned storage emulation

Sam Li (3):
  include: update virtio_blk headers
  virtio-blk: add zoned storage emulation for zoned devices
  virtio-blk: add some trace events for zoned emulation

 hw/block/trace-events                       |   7 +
 hw/block/virtio-blk-common.c                |   2 +
 hw/block/virtio-blk.c                       | 395 ++++++++++++++++++++
 include/standard-headers/linux/virtio_blk.h | 158 +++++++-
 4 files changed, 546 insertions(+), 16 deletions(-)

-- 
2.38.1
Re: [RFC v5 0/3] Add zoned storage emulation to virtio-blk driver
Posted by Stefan Hajnoczi 1 year, 4 months ago
On Mon, Dec 19, 2022 at 04:16:41PM +0800, Sam Li wrote:
> Note: the virtio-blk headers isn't upstream in the kernel yet therefore
> marked as an RFC. More information can be found here:
> https://patchwork.kernel.org/project/linux-block/cover/20221030043545.974223-1-dmitry.fomichev@wdc.com/

The VIRTIO spec changes have been merged. The Linux virtio_blk guest
driver patches are in Michael Tsirkin's vhost tree:
https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git/tree/drivers/block/virtio_blk.c?h=vhost

The "RFC" can be dropped as soon as Linus merges the changes. Almost
there!