Internships/ProjectIdeas/LibblkioZonedStorage

From QEMU
Revision as of 14:31, 7 February 2023 by Stefanha (talk | contribs)

Zoned device support for libblkio

Summary: Add support for zoned block devices to the libblkio library.

Zoned block devices are special kinds of disks that are split into several regions called zones, where each zone may only be written sequentially and data can't be updated without resetting the entire zone.

libblkio is a library that provides an API for efficiently accessing block devices using modern high-performance block I/O interfaces like Linux io_uring.

The goal is to extend libblkio so users can use it to access zoned devices properly. This will require adding support for more request types, expanding its API to expose additional metadata about the device, and making the appropriate changes to each libblkio "driver".

The project consists of the following tasks:

  • Add libblkio properties that identify zoned devices and their capabilities (zone size, max active zones, whether zone append is supported, etc).
  • Add zone append, report zones, and zone management to the libblkio API.
  • Extend the io_uring driver to support zoned storage. Zone append may be tricky to implement because Linux has a no userspace API for it and can be considered a stretch goal if there's time.
  • Extend the virtio-driver crate to implement zoned APIs.
  • (Stretch goal) Modify QEMU's blkio block driver to use the new libblkio zoned APIs.

This is important for QEMU since it will soon support zoned devices too and several of its BlockDrivers rely on libblkio. In particular, this project would enable QEMU to access zoned vhost-user-blk and vhost-vdpa-blk devices.

Links:

Details:

  • Project size: 175 hours
  • Skill level: intermediate
  • Language: Rust, C
  • Mentor: Alberto Faria <afaria@redhat.com> (afaria on IRC), Stefan Hajnoczi <stefanha@redhat.com> (stefanha on IRC)
  • Suggested by: Alberto Faria <afaria@redhat.com>