+41
−0
+99
−10
+2
−0
Loading
We will add the DIF insert/strip feature into the generic bdev layer. We want to make the feature option per bdev open. There exists spdk_bdev_open_async_opts. However it is only for spdk_bdev_open_async(). spdk_bdev_open_async() is not generally usable. spdk_bdev_open_ext() does not receive any option structure via parameter. It is not practical to change the existing spdk_bdev_open_ext(). Hence, add a new API spdk_bdev_open_ext_v2() with spdk_bdev_open_opts structure. We find many examples to use v2 in DPDK. Add hide_metadata option as the first option of the spdk_bdev_open_opts structure. Last 7 bytes in spdk_bdev_open_opts structure are unused and are not initialized by the caller. To zero out these clearly with minimal user effort, add spdk_bdev_open_opts_init() for initialization. opts in spdk_bdev_desc is a hot data. Put it into the first cache line in spdk_bdev_desc. Furthermore, add simple unit test for verification. Signed-off-by:Shuhei Matsumoto <smatsumoto@nvidia.com> Change-Id: I38d93ffbb2becc59e57f9a7163defd5f8f201f07 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/23771 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Jim Harris <jim.harris@nvidia.com> Community-CI: Mellanox Build Bot Reviewed-by:
Aleksey Marchuk <alexeymar@nvidia.com> Community-CI: Community CI Samsung <spdk.community.ci.samsung@gmail.com>