[PATCH 0/2] Fix nvme copy command with pi metadata

Dmitry Tikhov posted 2 patches 2 years ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220420090336.10124-1-d.tihov@yadro.com
Maintainers: Keith Busch <kbusch@kernel.org>, Klaus Jensen <its@irrelevant.dk>
hw/nvme/ctrl.c       |   5 ++
hw/nvme/dif.c        | 186 +++++++++++++++++++++++++++++++++----------
hw/nvme/dif.h        |   3 +
hw/nvme/trace-events |   4 +-
4 files changed, 155 insertions(+), 43 deletions(-)
[PATCH 0/2] Fix nvme copy command with pi metadata
Posted by Dmitry Tikhov 2 years ago
Current implementation of copy command, for namespace with end-to-end
data protection enabled, always returns data integrity field check
errors.
For example, issuing with nvme-cli:

    nvme copy --sdlba=25 --blocks=2,1,3 --slbs=1,37,50 --prinfow=5
    --prinfor=5 --ref-tag=25 --expected-ref-tags=1,37,50 /dev/nvme0n1

Always returns End-to-end Reference Tag Check Error.
To reproduce you may need to use upstream version of nvme-cli since
there was a bug which prevented passing prinfow to a command, fixed in
2cf9825 commit.

This patch set attempts to fix copy command for data protection enabled
namespaces.

Dmitry Tikhov (2):
  hw/nvme: refactor check of disabled dif
  hw/nvme: fix copy cmd for pi enabled namespaces

 hw/nvme/ctrl.c       |   5 ++
 hw/nvme/dif.c        | 186 +++++++++++++++++++++++++++++++++----------
 hw/nvme/dif.h        |   3 +
 hw/nvme/trace-events |   4 +-
 4 files changed, 155 insertions(+), 43 deletions(-)

-- 
2.35.1