Zoned Storage Emulation So Far

Looking back to what I’ve accomplished so far, it is quite a journey. As for the original internship project timeline, I was thinking about the timeline too naively and took no regard of difficulty of certain project task.

For the rest of the internship, the major goal is to finish the first part of the original proposal - Extending zoned storage emulation support in virtio-blk device - and get it merged. Besides, I think it’s possible to finish part two - Adding support to NVMe ZNS for guest driver testing - before the project ends. Maybe not if unexpected issues appear :)

If I were starting the project over, I would ask questions earlier rather than get stuck at sth for a really long time. It’s important to ask questions, which is a way to investigate more and find out what is wrong or unknown. I read several PPT slides about the block device and QEMU structure, zoned storage website, and codes in virtio-blk.c etc before the internship begins. It’s not very helpful because I did not know what to ask at first.

What I’ve done in last two months is finishing the most of zoned storage emulation, except zone append emulation part. One project task took longer than expected is the zone report emulation. It bothers me that I’ve taken this long to have a simple workable version. At first, I thought it’s a three-week task after talking to my mentors about the developing plan in the first week. However, I have underestimated a lot of details that can mostly be spotted only during the implementations. Going through the major issues in the last several weeks, I found that:

  1. set up a full guest VM. <1 week>
  2. no fake zones -> Use real zoned device information.(methods switching)/right way to test <1 week>
  3. errors when booting the guest os(driver side, kernel side) -> no errors, the guest os gets stuck <2 weeks>
  4. fix the issue of the zoned feature bit <1 week>

The most interesting I’ve learned so far is to get the device communicate with the guest driver so that the zone report emulation can work. My mentors helped me a lot during the debugging process where I’ve learned incrementally about what happens exactly in both device side and driver side.