+8
−0
Loading
The generic bdev layer should not pass an I/O with a dif_check_flags set that the underlying bdev does not support. The generic bdev layer satisfies this requirement now. The following patches will change the passthrough vbdev module and the bdev partition layer to passthrough dif_check_flags. We want to do this as simply as we can. But, we want to keep satisfying this requirement. Add an assert to ensure this requirement to be satisfied in future. We should enable this check only for I/O types which support DIF. Add a helper function to check if bdev_io supports DIF or not. Assert is not enabled by release mode. Compiler unused warning does not care about inline functions. Inline function + switch-case is easy for extension. Signed-off-by:Shuhei Matsumoto <smatsumoto@nvidia.com> Suggested-by:
Jim Harris <jiharris@nvidia.com> Change-Id: Ibdf3307862ea3287df130e63d899fc8cce2a3d31 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/23016 Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Jim Harris <jim.harris@nvidia.com> Reviewed-by:
Aleksey Marchuk <alexeymar@nvidia.com> Community-CI: Mellanox Build Bot Community-CI: Community CI Samsung <spdk.community.ci.samsung@gmail.com>