+6
−0
Loading
Each DIF generation/verification function has two modes, non-split and split. For split mode, DIF fields are copied. However, for non-split mode, DIF fields are updated directly. If check is disabled, the DIF field is not touched for non-split case. This is inconsistent. Not only inconsistency but also this caused a real problem for the malloc bdev module. The patch https://github.com/spdk/spdk/commit/e1f15ba5418b38056fdb6d67186075aa1fada9e7 caused the problem. When malloc bdev is created, its reference tags are initialized to 0xFFFFFFFF. This means reference tag should be ignored. However, this makes sense only if application tags are initialized to 0xFFFF for DIF type 1. However, in SPDK, usually application tag check is disabled. If application tag is not 0xFFFF, verification always detects reference tag error. Hence, in the following patches, we will change the malloc bdev module to set application tags to 0xFFFF by enabling check only at disk creation. However, after that, we have no way to enable DIF check if application tag check is not enabled. If any valid meaningfull value is written to guard tag or reference tag, DIF check should not be disabled. This patch can resolve the problem. Signed-off-by:Shuhei Matsumoto <smatsumoto@nvidia.com> Change-Id: Ic21cd7c1c4d082f431382f561167cf7d75808008 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/25323 Reviewed-by:
Aleksey Marchuk <alexeymar@nvidia.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Reviewed-by:
Jim Harris <jim.harris@nvidia.com> Community-CI: Community CI Samsung <spdk.community.ci.samsung@gmail.com> Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot