Skip to content

hw/block/nvme: metadata and end-to-end data protection support

Klaus Jensen qemu-devel 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest13 patches 8 repliesIn review
  2. v412 patches 2 repliesSuperseded
  3. v3 RFC12 patches 13 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v2 RFC8 patches5 repliesSuperseded
v1 RFC3 patches5 repliesSuperseded

Changes in v5 from the cover letter

* add a required fix for zone management receive when metadata is involved
* add a couple of refactor patches for the zoned init code to make the format nvm patch more straight forward wrt. formatting of zoned namespaces.

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13hw/block/nvme: fix zone management receive reporting too many zoneshw/block/nvme.c+3 -22 replies
2/13hw/block/nvme: add metadata supporthw/block/nvme-ns.c hw/block/nvme-ns.h hw/block/nvme.c +1 more+632 -930 replies
3/13hw/block/nvme: end-to-end data protectionhw/block/meson.build hw/block/nvme-dif.c hw/block/nvme-dif.h +6 more+857 -470 replies
4/13hw/block/nvme: add verify commandhw/block/nvme-dif.c hw/block/nvme-dif.h hw/block/nvme.c +3 more+156 -30 replies
5/13hw/block/nvme: add non-mdts command size limit for verifyhw/block/nvme.c hw/block/nvme.h+31 -40 replies
6/13hw/block/nvme: support multiple lba formatshw/block/nvme-ns.c+52 -80 replies
7/13hw/block/nvme: prefer runtime helpers instead of device parametershw/block/nvme-ns.c hw/block/nvme-ns.h+4 -41 reply
8/13hw/block/nvme: pull lba format initializationhw/block/nvme-ns.c+41 -331 reply
9/13hw/block/nvme: parameterize nvme_ns_nlbashw/block/nvme-ns.h+10 -43 replies
10/13hw/block/nvme: remove invalid zone resource checkshw/block/nvme-ns.c+0 -130 replies
11/13hw/block/nvme: move zoned constraints checkshw/block/nvme-ns.c+28 -240 replies
12/13hw/block/nvme: split zone check/set geometryhw/block/nvme-ns.c+47 -290 replies
13/13hw/block/nvme: add support for the format nvm commandhw/block/nvme-ns.c hw/block/nvme-ns.h hw/block/nvme.c +3 more+210 -60 replies

Reviews trailers per patch

9 of 13 patches have a Reviewed-by or Acked-by.

PatchKeith BuschGollu AppalanaiduDmitry FomichevMinwoo Im
1/13R-b
2/13R-b Co-authored-by
3/13R-b Co-authored-by
4/13R-b
5/13R-b
6/13R-b
7/13R-b
8/13R-b
9/13R-b
10/13
11/13
12/13
13/13

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v5 thread

Cover letter [PATCH v5 00/13] hw/block/nvme: metadata and end-to-end data protection support

From: Klaus Jensen <[email protected]>

This is v5 of a series that adds support for metadata and end-to-end data protection.

First, on the subject of metadata, in v1, support was restricted to extended logical blocks, which was pretty trivial to implement, but required special initialization and broke DULBE. In v2, metadata is always stored continuously at the end of the underlying block device. This has the advantage of not breaking DULBE since the data blocks remains aligned and allows bdrv_block_status to be used to determinate allocation status. It comes at the expense of complicating the extended LBA emulation, but on the other hand it also gains support for metadata transfered as a separate buffer.

The end-to-end data protection support blew up in terms of required changes. This is due to the fact that a bunch of new commands has been added to the device since v1 (zone append, compare, copy), and they all require various special handling for protection information. If potential reviewers would like it split up into multiple patches, each adding pi support to one command, shout out.

Support for metadata and end-to-end data protection is all joint work with Gollu Appalanaidu.

v5:
* add a required fix for zone management receive when metadata is involved
* add a couple of refactor patches for the zoned init code to make the format nvm patch more straight forward wrt. formatting of zoned namespaces.

v4:
* promoted from RFC
* moved most eedp additions to nvme-dif.{c,h}. (Keith)

v3:

* added patch with Verify command
* added patches for multiple LBA formats and Format NVM
* changed NvmeSG to be a union (Keith)

Gollu Appalanaidu (1):
hw/block/nvme: add verify command

Klaus Jensen (10):
hw/block/nvme: fix zone management receive reporting too many zones hw/block/nvme: add metadata support
hw/block/nvme: end-to-end data protection
hw/block/nvme: add non-mdts command size limit for verify hw/block/nvme: prefer runtime helpers instead of device parameters hw/block/nvme: pull lba format initialization hw/block/nvme: parameterize nvme_ns_nlbas
hw/block/nvme: remove invalid zone resource checks hw/block/nvme: move zoned constraints checks hw/block/nvme: split zone check/set geometry

Minwoo Im (2):
hw/block/nvme: support multiple lba formats hw/block/nvme: add support for the format nvm command

 hw/block/nvme-dif.h   |   53 ++
 hw/block/nvme-ns.h    |   61 +-
 hw/block/nvme.h       |   34 ++
 include/block/nvme.h  |   29 +-
 hw/block/nvme-dif.c   |  508 +++++++++++++++++
 hw/block/nvme-ns.c    |  259 ++++++---
 hw/block/nvme.c       | 1267 +++++++++++++++++++++++++++++++++++++----
 hw/block/meson.build  |    2 +-
 hw/block/trace-events |   22 +-
 9 files changed, 2018 insertions(+), 217 deletions(-)
 create mode 100644 hw/block/nvme-dif.h
 create mode 100644 hw/block/nvme-dif.c
Signature · 1 line
2.30.1