Spdk/module/bdev
Konrad Sztyber 55f9479333 bdev: remove spdk_bdev_ext_io_opts from spdk_bdev_io
The spdk_bdev_ext_io_opts structure is used to pass extra options when
submitting a bdev IO request, without having to modify/add functions to
handle new options.  Additionally, the structure has a size field to
allow adding new fields without breaking the ABI (and thus having to
bump up the major version of a library).

It is also a part of spdk_bdev_io and there are several reasons for
removing it from that structure:

  1. The size field only makes sense in structures that are passed
     through pointers.  And spdk_bdev_ext_io_opts is indeed passed as a
     pointer to spdk_bdev_{readv,writev}_blocks_ext(), however it is
     also embedded in spdk_bdev_io (internal.ext_opts_copy), which is
     also part of the API.  It means that each time a new field is added
     to spdk_bdev_ext_io_opts, the size of spdk_bdev_io will also
     change, so we will need to bump the major version of libspdk_bdev
     anyway, thus making spdk_bdev_ext_io_opts.size useless.
  2. The size field also makes internal.ext_opts cumbersome to use, as
     each time one of its fields is accessed, we need to check the size.
     Currently the code doesn't do that, because all of the existing
     spdk_bdev_ext_io_opts fields were present when this structure was
     initially introduced, but we'd need to do check the size before
     accessing any new fields.
  3. spdk_bdev_ext_io_opts has a metadata field, while spdk_bdev_io
     already has u.bdev.md_buf, which means that we store the same thing
     in several different places in spdk_bdev_io (u.bdev.md_buf,
     u.bdev.ext_opts->metadata, internal.ext_opts->metadata).

Therefore, this patch removes all references to spdk_bdev_ext_io_opts
from spdk_bdev_io and replaces them with fields (memory_domain,
memory_domain_ctx) that were missing in spdk_bdev_io.  Unfortunately,
this change breaks the API and requires changes in bdev modules that
supported spdk_bdev_io.u.bdev.ext_opts.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I49b7524eb84d1d4d7f12b7ab025fec36da1ee01f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16773
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-02-16 10:09:35 +00:00
..
aio so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
compress module/bdev: Use error_response() rather than bool_response(false) for JSON RPCs 2023-01-31 21:40:09 +00:00
crypto bdev/crypto: Use iobuf large_bufsize to set opt IO boundary 2023-02-03 08:54:34 +00:00
daos bdev/daos: Use bdev_unregister_by_name() to delete a daos bdev 2023-01-31 21:40:09 +00:00
delay bdev: remove spdk_bdev_ext_io_opts from spdk_bdev_io 2023-02-16 10:09:35 +00:00
error so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
ftl module/bdev: Use error_response() rather than bool_response(false) for JSON RPCs 2023-01-31 21:40:09 +00:00
gpt bdev_gpt: add new SPDK partition type for off-by-one fix 2023-01-24 17:19:35 +00:00
iscsi so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
lvol bdev: remove spdk_bdev_ext_io_opts from spdk_bdev_io 2023-02-16 10:09:35 +00:00
malloc so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
null so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
nvme bdev: remove spdk_bdev_ext_io_opts from spdk_bdev_io 2023-02-16 10:09:35 +00:00
ocf deprecation: remove Open CAS Framework 2023-01-26 15:16:19 +00:00
passthru bdev: remove spdk_bdev_ext_io_opts from spdk_bdev_io 2023-02-16 10:09:35 +00:00
pmem deprecation: Remove support for PMDK 2023-01-26 15:16:19 +00:00
raid bdev: remove spdk_bdev_ext_io_opts from spdk_bdev_io 2023-02-16 10:09:35 +00:00
rbd so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
split so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
uring so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
virtio so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
xnvme bdev/xnvme: Use bdev_unregister_by_name() to delete a xnvme bdev 2023-01-31 21:40:09 +00:00
zone_block module/bdev: Use error_response() rather than bool_response(false) for JSON RPCs 2023-01-31 21:40:09 +00:00
Makefile configure: rename --with-reduce --with-vbdev-compress 2022-12-08 12:55:27 +00:00