+10
−0
Loading
We have some cases where libraries need the spdk_bdev_module structure definition and a couple of related APIs, but not everything else (i.e. spdk_bdev, spdk_bdev_io), for purposes of avoiding abidiff errors. For example, nvmf creates a dummy spdk_bdev_module, and then uses it with the spdk_bdev_module_claim_bdev API to ensure multiple subsystems cannot add the same bdev as a namespace. But when nvmf includes bdev_module.h, it pulls in the spdk_bdev structure definition as well. This means when the spdk_bdev structure is modified, it requires a major version bump since abidiff detects the difference in the debug info. Alternatives considered: * We could add a specific suppression into our abidiff script for nvmf and struct spdk_bdev, but it would be a risk (albeit very very small one) that we could add a real dependency on struct spdk_bdev in the future, and the suppression would hide the difference. * We could also break out bdev_module.h into multiple header files, but the ways of doing that either result in odd file naming, or modifying every bdev module to include a new header. * We could add a public bdev API to expose what the bdev library needs, but that seemed even more intrusive than this change. nvmf is kind of abusing the bdev_module API here, and I'd prefer to not promote that kind of usage by adding something to the bdev API. Signed-off-by:Jim Harris <james.r.harris@intel.com> Change-Id: Ie8fdef8ea294d005b9ae7934dde49c62748420d1 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7737 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Reviewed-by:
Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by:
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com>