This patch removes callback function for subsystems to
present their options for legacy config.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I63076fc03eff45da5d57fab03501602922a20e3e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4749
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This patch removes function for bdev modules to
present options of the bdevs.
blob_bdev.h refers to the spdk_bdev_module, so would need
to be bumped too.
At this time spdk_bdev_module is left unchanged to prevent
that.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I3cacb087c998d928c5d8c2722b7f041d82bb43f1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4748
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
This patch removes legacy config support in iscsi subsystem.
All options through the legacy config are already reflected in JSON.
Following RPCs are corresponding to removed legacy config sections:
Initiator groups - iscsi_create_initiator_group and iscsi_initiator_group_*
Subsystem options - iscsi_set_options
Portal groups - iscsi_create_portal_group
Target node - iscsi_create_target_node and iscsi_target_node_*
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I11326a84d4d580b19db422b8522198eea5a5be0d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4747
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Replace all calls of spdk_bdev_create_bs_dev_from_desc() and
spdk_bdev_open_ext() by calls of spdk_bdev_create_bs_dev_ext()
including unit tests.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Idb9dc5a10f6e221c26e82e0194930cb7a2071dae
Change-Id: I61e577db9e26ef3e1c3e2e4093ad66922a178f34
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4723
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Change the first parameter of vbdev_lvs_create() from bdev pointer
to bdev name, and then remove spdk_bdev_get_by_name() from
rpc_bdev_lvol_create_lvolstore().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9b0e47f551657f6aa1235af37a8357b0af62d414
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4707
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
spdk_bdev_create_bs_dev_ext() gets not bdev pointer but bdev name
as an argument, and hence vbdev_lvs_create() will get bdev name
accordingly.
However after completing spdk_bdev_create_bs_dev_ext(),
vbdev_lvs_create() has to get bdev pointer from the created bs_dev.
Hence add a function pointer get_base_bdev to struct spdk_bs_dev
and set it to bdev_blob_get_base_bdev() at initialization.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Idef0663ace85db0269442212014286669c150069
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4706
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This is a drop-in replacement. The following patches will remove
spdk_bdev_get_by_name() from the operation to create lvol store.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I31688cf98625f1d13012281d89f06d343e2f2cef
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4705
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
spdk_bdev_open_ext() requires the caller to use bdev_event_cb_t
and bdev_event_cb_t is more extensible than bdev_remove_cb_t.
Hence use bdev_event_t as an argument.
spdk_bdev_open_ext() calls spdk_bdev_get_by_name() inside and
spdk_bdev_create_bs_dev_ext() calls spdk_bdev_open_ext() inside.
The caller needs to know if the spdk_bdev_get_by_name() succeeded.
Hence spdk_bdev_create_bs_dev_ext() returns return code by return
value and returns the created bs_dev by double pointer.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1c225bfb66db036439c69c459f39c86684d8a540
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4692
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
- Removed slew of conf.h includes
- No longer require mk vars that include conf
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ica7e8e8bf1d4a5d0b0200bfe689aa13afd77bfaf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4746
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Since legacy config is being removed, SPDK_ACCEL_MODULE_REGISTER
macro no longer needs field corresponding to processing this
type of configuration.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I76ca02487a5fb8f9ecc9d33ac6fa514e7226a03b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4636
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This patch removes legacy config support in ioat accel module.
All options through the legacy config are already reflected in JSON.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Iebaeef4cf648874700238f6167462f4958546be2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4635
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This patch removes legacy config support in virtio_blk and virtio_scsi bdev modules.
Most of the options through the legacy config are already reflected in JSON.
Exception to that is "[VirtioPci] Enable" option, which worked for virtio_blk
and virtio_scsi. It then on initialization scanned virtio_pci devices for
presence of blk/scsi. There is no RPC that scans it on demand, nor was it used
in any of the tests. So this patch removes that functionality,
if needed this can be reintroduced as new RPC (or two for each backend).
Module initialization for bdev_virtio_scsi changed to be synchronous.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib0978a4a084795e94993bb9122bd73ed49e14b96
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4667
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This patch removes legacy config support in nvmf subsystem.
All options through the legacy config are already reflected in JSON.
Since the step in target initialization no longer does config
parsing, it was renamed appropriately.
There is no longer a need to delay this step via send msg,
since no callback is used.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I5ee080bb1f5bf954f3b00545adb16e7176c35530
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4644
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
This is a step to prepare for deletion of conf.c.
Adding discovery subsystem is now moved out of parsing the legacy config.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Idd36b5443541a1cc542d6837f17798bc6aaf17e9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4664
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This is a step to prepare for deletion of conf.c.
NVMe-oF target application always creates the default 'nvmf_tgt'.
This was done as part of legacy configuration parsing, but does
not belong there at all.
Acceptor poll rate and max subsystems are set via RPC before this
step, or via legacy config. Since this patch creates target before
parsing the config, options defined there no longer change the target.
Parsing of legacy config will be removed further down the series,
so no need to refactor to keep the original functionality.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I6f87df0ad3f03b72d6f916de50e5eab6d29dafa9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4663
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This is a step to prepare for deletion of conf.c.
spdk_nvmf_tgt_conf was allocated either by RPC or legacy config.
RPC still had to to allocate that because settings for subsystem
are set before subsystem itself initializes.
This patch removed both allocations and just defines that in the
subsystem. nvmf_set_config RPC can now be called multiple times,
only overwritting values that were passed.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I5438a91c1d15070f1f193e29f2000c4b58ea4816
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4662
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This patch removes legacy config support in vmd subsystem.
All options through the legacy config are already reflected in JSON.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I45f66809a889b39a05bf4f6856431d922b497c76
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4641
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Except for bdev_ocssd_submit_request(), we can pass nvme_ch instead
of ch to I/O functions, and do the change in this patch.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia9e09300d053fa80ada8286c8df7ec689bdb9aaf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4527
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This change follows the standard nvme bdev.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I83486712d23668e2688e0f1353519cea6dd6fef7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4689
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This changes follows the standard nvme bdev.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8306fef00489b36b57065bde78ccf9d852b5cba9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4688
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This change follows the standard nvme bdev.
Two local variables used ioch for nvme_io_channel and they were
confusing. Rename them by nvme_ch too.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iad42d28e698c3cacc3ebc9df379fc7551bebcb55
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4687
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
As same as the last patch, follow the pattern used by standard nvme
bdev about bdev_ocssd_submit_request().
Extract main operations from bdev_ocssd_submit_request() into
_bdev_ocssd_submit_request().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I286b4d82a356a3f1fac9c052397714cd7ee8497d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4525
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
It looks that we do not have any special reason not to follow
standard nvme bdev about bdev_ocssd_reset_sgl() and bdev_ocssd_next_sge(),
and it will be good for ocssd bdev to follow standard nvme bdev.
Add iovs and iovcnt to struct bdev_ocssd_io and rename iov_pos by
iovpos and iov_off by iov_offset.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ied864dc9505b3f1c0a19a8a36031dda9e32eb4d6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4524
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
We have two functions, remove_cb() and bdev_nvme_library_fini() to
depopulate all existing namespaces.
Factoring out the operation into a helper function
nvme_ctrlr_depopulate_namespaces() will improve the readability.
Besides, change the line after return value for two functions to
adjust format.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibda921bdc94a50c14cca0ece462f76197efc5ccb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4642
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Swap the resetting case and the non-resetting case. Unlock mutex
before calling spdk_bdev_io_complete(). Use curr_trid instead of
tmp_trid to clarify the meaning of the stored value.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If3b520a16459aba498ac80ed887b9223ac5ca3d8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4523
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Consolidating error paths will be helpful to create and associate
with the creating controller. Fix a couple of memory leaks in error
paths together.
Then rename create_ctrlr() by nvme_bdev_ctrlr_create() to follow
naming conventions and clarify what type of controller is created.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I3f9073756198c0b0bc65b67ce84a41233297eac0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4509
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This patch removes legacy config support in uring bdev module.
All options through the legacy config are already reflected in JSON.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I79f9b4458af2fdf0e4683f9cd82b64e9658c5fcb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4672
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This patch removes legacy config support in split bdev module.
All options through the legacy config are already reflected in JSON.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Iaa8e546bbd6357ba93af8164e2f3d8e497fcec06
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4634
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This patch removes legacy config support in passthru bdev module.
All options through the legacy config are already reflected in JSON.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I53ee6e78d210c155a31ae6204472e89756e43e65
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4633
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This patch removes legacy config support in null bdev module.
All options through the legacy config are already reflected in JSON.
While here, added allocation failure check for g_null_read_buf.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I59a28a402e0c61e5636da623bc109e15b36f0584
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4626
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This patch removes legacy config support in malloc bdev module.
All options through the legacy config are already reflected in JSON.
Note that malloc_disk_count needs to be reset for each module initialization.
Otherwise for cases where bdev submodule is reinitialized, the count in
malloc names would grow. This should be addressed separately by making name
parameter required, rather than optional. Which is the case for most (all?)
of the other bdev modules.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ida93c74e7b0be7da19e11d5cc3fda9112824782f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4625
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This patch removes legacy config support in GPT bdev module.
Please note that disabling probing only for GPT partition does not
have a corresponding RPC.
Similar functionality is possible for all bdev modules at once via
`bdev_set_options --disable-auto-examine` RPC then followed by
`bdev_examine` RPC for particular bdev.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I9a106b3dc0953166264b11c2e95c4433163fcd3c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4624
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
It is not really necessary to replace spdk_bdev_open() by
spdk_bdev_open_ext() for virtio scsi bdev, but spdk_bdev_open() has been
deprecated. Hence do the replacement in this patch.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I995c01c3c5842b306497e32099f6cfe767333091
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4725
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This is a drop-in replacement.
spdk_bdev_open_ext() requires the caller to specify event_cb.
Hence base_bdev_event_cb() calls hotremove_cb() only if event_cb is
not NULL.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I98cd29781412406470a173e9714c65a07288c573
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4690
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
To reduce the patch size, use local variables for descriptor and
bdev pointer before allocating the bdev_zone_block structure.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie33fac33eeb39ccc2b016d2f9c1711fcf76ebd7a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4649
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
There are more transport on the way and we don't want to add
all their various opts into the single, generic structure.
We'll pass the JSON structure to transports instead. Then
the transport code can custom pull from the JSON any param
it wants.
To complement that, transports will now also have their own
JSON config dump callback. This was only done in the generic
nvmf.c so far, with conditions for RDMA and TCP.
Change-Id: I33115a8d56cec829b1c51311a318e0333cc64920
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: jiaqizho <jiaqi.zhou@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2761
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This is just a drop-in replacement.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I018ef60648122aa672430bb62dc7b1a2e1cd5d7c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4648
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This change removes the call of spdk_bdev_get_by_name() from
raid_bdev_add_base_devices() by passing bdev name instead of bdev
pointer to raid_bdev_add_base_device().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1dc7bb6edbc23513f69e7acdf8ca735494338bfd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4592
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This is a drop-in replacement. Update unit test together, and the
idea of the update was from the unit test for zone bdev module.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia8d0644f42b9d0a0ad502eebbe3e414abd1de4cf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4591
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
vbdev_crypto_claim() gets bdev name instead of bdev pointer
as a parameter, and open the corresponding base bdev first using
spdk_bdev_open_ext().
The purpose is to fix the race condition due to the time gap
between spdk_bdev_get_by_name() and spdk_bdev_open(). A bdev pointer
is valid only while the bdev is opened.
Resize event is not supported for now.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia0e1ce2ce696f431bb26af94729931c3ffb9a9d0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4588
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This patch removes legacy config support in error bdev module.
All options through the legacy config are already reflected in JSON.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I348c19f560057b46030aa03adcca073f0906de0a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4623
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
This patch removes legacy config support in AIO module.
All options through the legacy config are already reflected in JSON.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I43655ab8d3ca787a7e92072b195f3b73fcf4fdbf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4620
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
By design the opts for each implementation
can not match spdk_sock_impl_opts.
During get_opts for specific implementation
only used fields are filled.
Yet iterating over all spdk_sock_impl_opts fields
would yeild garbage values for unset fields.
This is the case right now when doing save_config RPC
with uring enabled. A garbe value for enable_zerocopy_send
is returned.
sock.c:829:62: runtime error: load of value 165, which is not a valid value for type '_Bool'
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ie0512a7dffc36c8ff89256d08f8a2f4fefcf9e83
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4699
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
There is no good reason to track every single I/O
to the module and especially not at INFO level behind
a log flag.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I16a772ae4d49d3c1963ca223ef0bc2068b405988
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4713
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This is a drop-in replacement of spdk_bdev_part_base_construct() by
spdk_bdev_part_base_construct_ext().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0c719683b5a9cd6dffce057552982d8e44871ab1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4580
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Use spdk_bdev_part_base_construct_ext() to pass bdev_name and
remove the spdk_bdev_get_by_name() call. Remove the created configuration
only if non-zero return code other than -ENODEV is returned.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ieb5ee5d7e1ccc984df1e84205be18c7b93799bba
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4579
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>