f4a62a3993
When using stacked virtual bdev (e.g. split virtual bdev), block address space will be remapped during I/O processing and so reference tag will have to be remapped accordingly. The use case is explained in detail as follows: - Format a single NVMe SSD with DIF enabled. - Create a NVMe bdev on the NVMe SSD with DIF enabled. - Create four split vbdevs on the NVMe bdev. - Add the split vbdevs to a NVMe-oF target. - Application is aware of block address space of the split vbdevs. - Application submits read/write I/O to the NVMe-oF target. Case 1: - Configure NVMe-oF target to DIF pass-through. Case 2: - Configure NVMe-oF target to DIF insert/strip For the case 1, - Application inserts DIF for write I/O and verifies DIF for read I/O. - The split vbdevs remaps reference tags of DIF both for read and write I/O because application expects reference tags are based on the block address space of split vbdevs. - The NVMe bdev processs read/write I/Os without remapping reference tags because reference tags are already based on the block address space of the NVMe bdev. For the case 2, - NVMe-oF target inserts DIF for write I/O, and verifies and strips DIF or read I/O. - The split vbdevs remaps reference tags of DIF both for read and write I/O because NVMe-oF target expects reference tags are based on the block address space of split vbdevs. - The NVMe bdev processs read/write I/Os without remapping reference tags because reference tags are already based on the block address space of the NVMe bdev. This patch adds two APIs, spdk_dif_ctx_set_remapped_init_ref_tag and spdk_dif_remap_ref_tag to satisfy the use case. UT code is added together in this patch. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: Ib3101129225b334d2f578eab75197790b1818770 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461103 Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> |
||
---|---|---|
.. | ||
include | ||
lib | ||
Makefile | ||
unittest.sh |