numam-spdk/lib/nvme
Daniel Verkamp 59fc5ba613 nvme: fix extended LBA block size calculations
For namespaces with end-to-end protection information, metadata size
of exactly 8 bytes, and extended LBA configured, the NVMe driver would
calculate the size of the data block incorrectly.  The NVMe spec has a
special provision for this specific case (8-byte metadata only) and
PRACT = 1 that requires that the host does not send the metadata as part
of the host memory buffer.

To fix this, clean up the calculation of the per-block data transfer
size by adding a new extended_lba_size field in the namespace, which
represents the total size of data to be transferred per block based on
the namespace's configured metadata size and whether it transfers
metadata as part of the data buffer.  Then add the special case for
PRACT = 1 and PI configured and extended LBA in the R/W helper
functions.

Change-Id: I0b383a58c773cac06e6c018858b57129064c6059
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-02-10 10:24:26 -07:00
..
Makefile nvme: Monitor uevent for device insert and remove 2016-11-30 14:27:43 -07:00
nvme_ctrlr_cmd.c nvme: add offset to spdk_nvme_ctrlr_cmd_get_log_page() 2016-12-15 11:16:14 -07:00
nvme_ctrlr.c util: move common helper functions to util.h 2017-02-10 09:38:52 -07:00
nvme_internal.h nvme: fix extended LBA block size calculations 2017-02-10 10:24:26 -07:00
nvme_ns_cmd.c nvme: fix extended LBA block size calculations 2017-02-10 10:24:26 -07:00
nvme_ns.c nvme: fix extended LBA block size calculations 2017-02-10 10:24:26 -07:00
nvme_pcie.c util: move common helper functions to util.h 2017-02-10 09:38:52 -07:00
nvme_qpair.c nvme: move nvme_qpair_fail() call to generic code 2017-01-31 14:50:40 -07:00
nvme_quirks.c nvme: Make striping a quirk 2016-12-09 14:38:42 -07:00
nvme_rdma.c util: move common helper functions to util.h 2017-02-10 09:38:52 -07:00
nvme_transport.c nvme: remove ctrlr_get_pci_id transport callback 2017-01-31 14:50:40 -07:00
nvme_uevent.c nvme: Remove pci_addr from probe_info 2016-12-12 10:46:50 -07:00
nvme_uevent.h nvme: Remove pci_addr from probe_info 2016-12-12 10:46:50 -07:00
nvme.c env: add spdk_mempool_create() socket_id parameter 2017-01-30 13:05:30 -07:00