Partitions and end-to-end protection

Keith Busch keith.busch at intel.com
Tue Jul 14 12:25:53 PDT 2015


On Tue, 14 Jul 2015, Martin K. Petersen wrote:
> But the fundamental question remains: Why is it a prerequisite for the
> NVMe integrity profile to be added before the disk is live? Nobody else
> requires this (sd, md, dm).

NVMe doesn't provide a way to disable transferring metadata
per-io. Capacity zero prevents IO when it's added because we don't have
a metadata buffer to assign CMD.MPTR. The drive will unconditionally
attempt DMA to/from MPTR, so it's potential memory and data corruption
if we let it happen.

An alternative to requiring blk integrity provide the metadata buffer,
we could have the driver allocate a large scratch buffer just so we have
something valid to set MPTR even. I didn't do that initially because we
can't use the metadata for anything at that point, and it seems odd to
have the driver implement this special case just to satisfy add_disk().



More information about the Linux-nvme mailing list