|
Revision tags: v25.01-rc1, v24.09, v25.01-pre, v24.09-rc1 |
|
| #
186b109d |
| 20-Aug-2024 |
Jim Harris <jim.harris@samsung.com> |
env: add SPDK_ENV_NUMA_ID_ANY and replace socket_id with numa_id
We will try to avoid further proliferation of "SOCKET_ID" to refer to a NUMA socket ID moving forward, and just use "NUMA_ID" to avoi
env: add SPDK_ENV_NUMA_ID_ANY and replace socket_id with numa_id
We will try to avoid further proliferation of "SOCKET_ID" to refer to a NUMA socket ID moving forward, and just use "NUMA_ID" to avoid confusion with TCP sockets.
Change all of the existing in-tree SPDK_ENV_SOCKET_ID_ANY uses to SPDK_ENV_NUMA_ID_ANY, but keep the old #define around, at least for now. Also change all 'socket_id' parameters to 'numa_id'.
We still have spdk_env_get_socket_id(), we will need to keep this but next patch will add spdk_env_get_numa_id().
Signed-off-by: Jim Harris <jim.harris@samsung.com> Change-Id: Idc31c29e32b708c24d88f9c6fecaf9a99e34ba1e Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/24607 Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Reviewed-by: Ben Walker <ben@nvidia.com> Community-CI: Mellanox Build Bot
show more ...
|
| #
1521bf3b |
| 17-Jul-2024 |
Shuhei Matsumoto <smatsumoto@nvidia.com> |
bdev/null: Make DIF PI format configurable at bdev creation
Make bdev's PI format configurable via the bdev_null_create RPC. Add the same check as the NVMe specification, for example, metadata size
bdev/null: Make DIF PI format configurable at bdev creation
Make bdev's PI format configurable via the bdev_null_create RPC. Add the same check as the NVMe specification, for example, metadata size should not be less than 16 bytes if format is 16/32b Guard PI.
Additionally, add dif_pi_format into write_json_config().
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Change-Id: I64a53fd3d6dae4c85865c5174d86a55854d74d87 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/24110 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <jim.harris@samsung.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
show more ...
|
| #
d2407f06 |
| 17-Jul-2024 |
Shuhei Matsumoto <smatsumoto@nvidia.com> |
bdev/null: Delegate or remove DIF config check of bdev_null_create RPC
NULL bdev module supports only interleaved metadata. opts->block_size is data block size. Hence, comparing opts->block_size and
bdev/null: Delegate or remove DIF config check of bdev_null_create RPC
NULL bdev module supports only interleaved metadata. opts->block_size is data block size. Hence, comparing opts->block_size and opts->md_size was a long check. Remove it.
Checking if opts->num_blocks is non-zero was duplicated.
As same as malloc bdev, we can move opts->physical_block_size check to bdev_null_create().
We can delegate DIF type check to spdk_dif_ctx_init().
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Change-Id: Ia2030d509db55f155121175694d5e82d45c49671 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/24208 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <jim.harris@samsung.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Community-CI: Mellanox Build Bot
show more ...
|
| #
36943038 |
| 17-Jul-2024 |
Shuhei Matsumoto <smatsumoto@nvidia.com> |
bdev/null: bdev_null_create RPC uses bdev_null_opts directly
The bdev_null_create RPC set rpc_construct_null structure and copied it to null_bdev_opts structure. However, this was not efficient or c
bdev/null: bdev_null_create RPC uses bdev_null_opts directly
The bdev_null_create RPC set rpc_construct_null structure and copied it to null_bdev_opts structure. However, this was not efficient or clean.
The difference of rpc_construct_null structure and null_bdev_opts structure were: 1. null_bdev_opts::block_size was block size, rpc_construct_null::block_size was data block size 2. null_bdev_opts::uuid was pointer, rpc_construct_null::uuid was instance
For #1, as we do for malloc bdev, we can use null_bdev_opts::block_size as data block size. If null_bdev_opts::block_size is data block size, we do not have to compare opts::block_size and opts::md_size.
For #2, as we do for malloc bdev, null_bdev_opts::uuid can be instance and we can copy null_bdev_opts::uuid to spdk_bdev::uuid.
Additionally, spdk_null_bdev_opts is not a public data structure. Hence, it should not have "spdk_" prefix.
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Change-Id: If53702071cf02fe23d03f464a63c2495c70e1f12 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/24109 Reviewed-by: Jim Harris <jim.harris@samsung.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot
show more ...
|
| #
ccc88995 |
| 17-Jul-2024 |
Shuhei Matsumoto <smatsumoto@nvidia.com> |
bdev/null: Remove md_interleave from null_bdev_opts
Null bdev module supports only interleaved metadata. We can remove md_interleave from null_bdev_opts and just set md_interleave to true at bdev cr
bdev/null: Remove md_interleave from null_bdev_opts
Null bdev module supports only interleaved metadata. We can remove md_interleave from null_bdev_opts and just set md_interleave to true at bdev creation.
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Change-Id: I60eb1769914d62a3e855d893b03199b395631100 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/24207 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <jim.harris@samsung.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
show more ...
|
| #
fcf59a6f |
| 10-Jun-2024 |
Shuhei Matsumoto <smatsumoto@nvidia.com> |
module/bdev: Initialize bdev->dif_pi_format
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Change-Id: I5393205a7a29eca2577b4c0772ec08526fd8a8c0 Reviewed-on: https://review.spdk.io/gerrit/c/
module/bdev: Initialize bdev->dif_pi_format
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Change-Id: I5393205a7a29eca2577b4c0772ec08526fd8a8c0 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/23626 Reviewed-by: Jim Harris <jim.harris@samsung.com> Community-CI: Mellanox Build Bot Reviewed-by: Ben Walker <ben@nvidia.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
show more ...
|
|
Revision tags: v24.05, v24.09-pre, v24.05-rc1, LTS, v24.01, v24.05-pre, v24.01-rc1 |
|
| #
5fa0d850 |
| 29-Sep-2023 |
Ben Walker <ben@nvidia.com> |
bdev/null: Use per-io context to allocate TAILQ_ENTRY
We're eliminating module_link from spdk_bdev_io, so use the per-io context space to create one for this module.
Change-Id: I52f8d452b51f5dd6de2
bdev/null: Use per-io context to allocate TAILQ_ENTRY
We're eliminating module_link from spdk_bdev_io, so use the per-io context space to create one for this module.
Change-Id: I52f8d452b51f5dd6de28f298c0c3cf8af30decd5 Signed-off-by: Ben Walker <ben@nvidia.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/21936 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
show more ...
|
| #
f751b712 |
| 22-Jan-2024 |
Slawomir Ptak <slawomir.ptak@intel.com> |
bdev/null: Enable DIF check flags per-IO override
Change-Id: I40f822d36e3dc5f2822d8674566dcd2f922756e8 Signed-off-by: Slawomir Ptak <slawomir.ptak@intel.com> Reviewed-on: https://review.spdk.io/gerr
bdev/null: Enable DIF check flags per-IO override
Change-Id: I40f822d36e3dc5f2822d8674566dcd2f922756e8 Signed-off-by: Slawomir Ptak <slawomir.ptak@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/21529 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <jim.harris@samsung.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
show more ...
|
| #
a9837c70 |
| 20-Nov-2023 |
Changpeng Liu <changpeng.liu@intel.com> |
bdev/null: use the same way as Malloc to create device with metadata
When creating device with metadata, `block_size` means data block size without including metadata size, this is the same as Mallo
bdev/null: use the same way as Malloc to create device with metadata
When creating device with metadata, `block_size` means data block size without including metadata size, this is the same as Malloc device. Also check the input metadata size.
Fix #3191.
Change-Id: I8b64e0605de2e42ee053e749720f74706b623835 Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/20643 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Karol Latecki <karol.latecki@intel.com>
show more ...
|
| #
69f9c9ac |
| 10-Nov-2023 |
Jim Harris <jim.harris@samsung.com> |
lib, module: use spdk_json_write_named_uuid
Use spdk_json_write_named_uuid everywhere possible, instead of the older spdk_uuid_fmt_lower+spdk_json_write_named_string approach.
Signed-off-by: Jim Ha
lib, module: use spdk_json_write_named_uuid
Use spdk_json_write_named_uuid everywhere possible, instead of the older spdk_uuid_fmt_lower+spdk_json_write_named_string approach.
Signed-off-by: Jim Harris <jim.harris@samsung.com> Change-Id: I75f97efb6e88fdb032f7ae94f11039457ba70f2a Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/20562 Community-CI: Mellanox Build Bot Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
show more ...
|
| #
e85f1f11 |
| 26-Oct-2023 |
Konrad Sztyber <konrad.sztyber@intel.com> |
rpc: use spdk_json_decode_uuid() to decode UUIDs
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I99e5d44d2cea4d50219b44e4595379a3a17bd11f Reviewed-on: https://review.spdk.io/ger
rpc: use spdk_json_decode_uuid() to decode UUIDs
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I99e5d44d2cea4d50219b44e4595379a3a17bd11f Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/20475 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <jim.harris@samsung.com>
show more ...
|
|
Revision tags: v23.09, v24.01-pre, v23.09-rc1 |
|
| #
5681a8a6 |
| 07-Jun-2023 |
Konrad Sztyber <konrad.sztyber@intel.com> |
dif: remove packed attribute from spdk_dif_ctx_init_ext_opts
Following the recommendation introduced in 1d77eec82, the packed attribute was removed from spdk_dif_ctx_init_ext_opts and the way its si
dif: remove packed attribute from spdk_dif_ctx_init_ext_opts
Following the recommendation introduced in 1d77eec82, the packed attribute was removed from spdk_dif_ctx_init_ext_opts and the way its size is calculated was changed to use SPDK_SIZEOF().
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I8dab3ee5afcd2afe803dacc563bee9b029c7cbf6 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/18597 Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Community-CI: Mellanox Build Bot
show more ...
|
|
Revision tags: v23.05, v23.09-pre |
|
| #
07d28d02 |
| 16-May-2023 |
Slawomir Ptak <slawomir.ptak@intel.com> |
lib/util/dif: Wrappers for DIF fields access
Introduced wrappers for the DIF structure fields access, in order to prepare for extending the DIF structure with additional formats.
Change-Id: I5592f5
lib/util/dif: Wrappers for DIF fields access
Introduced wrappers for the DIF structure fields access, in order to prepare for extending the DIF structure with additional formats.
Change-Id: I5592f59d05a4bfecbfb88a5fad2815a38d965ea0 Signed-off-by: Slawomir Ptak <slawomir.ptak@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/18174 Community-CI: Mellanox Build Bot Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
show more ...
|
| #
a711d629 |
| 16-May-2023 |
Slawomir Ptak <slawomir.ptak@intel.com> |
lib/util/dif: Add an ext_opts param to spdk_dif_ctx_init
The extended options structure for the dif context initialization allows for adding new arguments without the function signature change. The
lib/util/dif: Add an ext_opts param to spdk_dif_ctx_init
The extended options structure for the dif context initialization allows for adding new arguments without the function signature change. The first extended parameter is the DIF Protection Information format (CRC-16).
Change-Id: I6a32e8570676265d757fc7251441e5547bbb475d Signed-off-by: Slawomir Ptak <slawomir.ptak@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/18146 Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot
show more ...
|
|
Revision tags: v23.01.1 |
|
| #
ed1b4c92 |
| 06-Mar-2023 |
Krzysztof Karas <krzysztof.karas@intel.com> |
bdev: delete UUID generation from ephemeral bdevs
Ensure no ephemeral bdev will generate its own UUID, unless this value has been specified via RPC. Generation is now being done by the bdev layer it
bdev: delete UUID generation from ephemeral bdevs
Ensure no ephemeral bdev will generate its own UUID, unless this value has been specified via RPC. Generation is now being done by the bdev layer itself.
Change-Id: I11efe819a28a137b738959a96a7bdf8c79cfaf64 Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17109 Community-CI: Mellanox Build Bot Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
show more ...
|
| #
7f50da15 |
| 14-Feb-2023 |
Panfil, Wojciech <wojciech.panfil@intel.com> |
null_bdev: Add physical block size optional argument
In the past we didn't use the distinction between logical block size and physical block size in null bdev. Now we can optionally set the physical
null_bdev: Add physical block size optional argument
In the past we didn't use the distinction between logical block size and physical block size in null bdev. Now we can optionally set the physical block size to be different then logical block size. It's useful for testing NVMe 512e Advanced Format scenarios.
Change-Id: Ib3713af9a4d0ce7fd322170b4d87100cfc91a103 Signed-off-by: Panfil, Wojciech <wojciech.panfil@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16792 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
show more ...
|
|
Revision tags: v23.01, v23.05-pre, v23.01-rc1, v22.01.2 |
|
| #
a6dbe372 |
| 01-Nov-2022 |
paul luse <paul.e.luse@intel.com> |
update Intel copyright notices
per Intel policy to include file commit date using git cmd below. The policy does not apply to non-Intel (C) notices.
git log --follow -C90% --format=%ad --date defa
update Intel copyright notices
per Intel policy to include file commit date using git cmd below. The policy does not apply to non-Intel (C) notices.
git log --follow -C90% --format=%ad --date default <file> | tail -1
and then pull just the 4 digit year from the result.
Intel copyrights were not added to files where Intel either had no contribution ot the contribution lacked substance (ie license header updates, formatting changes, etc). Contribution date used "--follow -C95%" to get the most accurate date.
Note that several files in this patch didn't end the license/(c) block with a blank comment line so these were added as the vast majority of files do have this last blank line. Simply there for consistency.
Signed-off-by: paul luse <paul.e.luse@intel.com> Change-Id: Id5b7ce4f658fe87132f14139ead58d6e285c04d4 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15192 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> Community-CI: Mellanox Build Bot
show more ...
|
|
Revision tags: v22.09, v23.01-pre, v22.09-rc1 |
|
| #
488570eb |
| 03-Jun-2022 |
Jim Harris <james.r.harris@intel.com> |
Replace most BSD 3-clause license text with SPDX identifier.
Many open source projects have moved to using SPDX identifiers to specify license information, reducing the amount of boilerplate code in
Replace most BSD 3-clause license text with SPDX identifier.
Many open source projects have moved to using SPDX identifiers to specify license information, reducing the amount of boilerplate code in every source file. This patch replaces the bulk of SPDK .c, .cpp and Makefiles with the BSD-3-Clause identifier.
Almost all of these files share the exact same license text, and this patch only modifies the files that contain the most common license text. There can be slight variations because the third clause contains company names - most say "Intel Corporation", but there are instances for Nvidia, Samsung, Eideticom and even "the copyright holder".
Used a bash script to automate replacement of the license text with SPDX identifier which is checked into scripts/spdx.sh.
Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Iaa88ab5e92ea471691dc298cfe41ebfb5d169780 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12904 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Dong Yi <dongx.yi@intel.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: <qun.wan@intel.com>
show more ...
|
|
Revision tags: v22.05, v22.09-pre, v22.05-rc1, v22.01.1 |
|
| #
02e3c62c |
| 29-Mar-2022 |
Shuhei Matsumoto <smatsumoto@nvidia.com> |
bdev/null: Use bdev_open_ext() for resize instead of bdev_get_by_name()
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Change-Id: I9381aad017fae63b725deb21790bf4e3f717c88e Reviewed-on: http
bdev/null: Use bdev_open_ext() for resize instead of bdev_get_by_name()
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Change-Id: I9381aad017fae63b725deb21790bf4e3f717c88e Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12072 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
show more ...
|
| #
4573e4cc |
| 29-Mar-2022 |
Shuhei Matsumoto <smatsumoto@nvidia.com> |
module/bdev: Use spdk_bdev_unregister_by_name() if possible
Replace spdk_bdev_get_by_name() + spdk_bdev_unregister() by spdk_bdev_unregister_by_name() wherever possible.
This simplifies the code an
module/bdev: Use spdk_bdev_unregister_by_name() if possible
Replace spdk_bdev_get_by_name() + spdk_bdev_unregister() by spdk_bdev_unregister_by_name() wherever possible.
This simplifies the code and makes the code more reliable.
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Change-Id: I91388c9d0b2e244cb745720a480803b03c42a226 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12066 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
show more ...
|
| #
a7d174e2 |
| 27-Feb-2022 |
Kefu Chai <tchaikov@gmail.com> |
bdev/null: call spdk_bdev_module_fini_done() even if not registered
in bdev subsystem, if any of the bdev module fails to initialize in bdev_modules_init(), this function just stops immediately. in
bdev/null: call spdk_bdev_module_fini_done() even if not registered
in bdev subsystem, if any of the bdev module fails to initialize in bdev_modules_init(), this function just stops immediately. in general, the non-zero rc is returned to the callback func passed to spdk_subsystem_init(). if spdk app is used for building the spdk application, it's very likely that app_start_rpc() is used as this very callback func. in this case, app_start_rpc() would just pass the `rc` to spdk_app_stop() which tears down all subsystems one after another.
bdev tears itself down by calling all its modules' module_fini(), including those whose .module_init never gets called. the problem is, if a bdev module marks its `.async_fini` true, and it calls spdk_bdev_module_fini_done() only if spdk_io_device_unregister(), then a bdev module which fails to initialize would leave us an spdk application hanging in the air.
a typical logging message sequence looks like:
[2022-02-27 20:47:13.766578] bdev.c:1438:spdk_bdev_initialize: *ERROR*: bdev modules init failed [2022-02-27 20:47:13.766622] subsystem.c: 169:spdk_subsystem_init_next: *ERROR*: Init subsystem bdev failed [2022-02-27 20:47:13.766638] app.c: 691:spdk_app_stop: *WARNING*: spdk_app_stop'd on non-zero [2022-02-27 20:47:13.766658] thread.c:2050:spdk_io_device_unregister: *ERROR*: io_device 0x10d3c30 not found
this is exactly the case we could run into if a bdev module fails to initialize and bdev_null is unable to call spdk_bdev_module_fini_done() when being teared down, because spdk_io_device_unregister() just refuses to call the callback if the I/O device is never registered.
since `g_null_read_buf` is set in bdev_null_initialize(), in this change, this pointer is checked for zero before calling spdk_io_device_unregister(), if it is NULL, spdk_bdev_module_fini_done() is called directly instead of calling spdk_io_device_unregister(). this helps to address the hanging issue.
Signed-off-by: Kefu Chai <tchaikov@gmail.com> Change-Id: I3a41fcd2f1c986e416dacecd5ca352dfd1e379b7 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11750 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
show more ...
|
|
Revision tags: v22.01, v22.01-rc1, v21.10, v21.10-rc1 |
|
| #
511fe155 |
| 10-Aug-2021 |
Tomasz Zawadzki <tomasz.zawadzki@intel.com> |
lib/bdev: added spdk_bdev_module_fini_done()
Callback for bdev modules is called 'module_fini', meanwhile after its execution bdev modules were to call 'spdk_bdev_module_finish_done()'.
This functi
lib/bdev: added spdk_bdev_module_fini_done()
Callback for bdev modules is called 'module_fini', meanwhile after its execution bdev modules were to call 'spdk_bdev_module_finish_done()'.
This function carries incorrect name, so it was deprecated and replaced with 'spdk_bdev_module_fini_done()'.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: I9a12dff746ea8b4b1570a3794470f7b24e29003e Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9148 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> 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: Changpeng Liu <changpeng.liu@intel.com>
show more ...
|
|
Revision tags: v21.07, v21.07-rc1, v21.04, v21.04-rc1, v21.01.1, v21.01, v21.01-rc1 |
|
| #
d0657f32 |
| 06-Jan-2021 |
Jin Yu <jin.yu@intel.com> |
bdev_null: add null bdev resize rpc
Usually null bdev is used in testing. The resize function provides flexibility
Change-Id: I603db0b85ff13a86d38ccc8dd6f260807393df93 Signed-off-by: Jin Yu <jin.yu
bdev_null: add null bdev resize rpc
Usually null bdev is used in testing. The resize function provides flexibility
Change-Id: I603db0b85ff13a86d38ccc8dd6f260807393df93 Signed-off-by: Jin Yu <jin.yu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5797 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
show more ...
|
| #
024179d8 |
| 17-Nov-2020 |
Nick Connolly <nick.connolly@mayadata.io> |
module: Use PRId64 for portability
POSIX defines PRId64/PRIu64/PRIx64 for printing 64-bit values in a portable way. Replace a few references to %ld to remove the assumption about the size of a long.
module: Use PRId64 for portability
POSIX defines PRId64/PRIu64/PRIx64 for printing 64-bit values in a portable way. Replace a few references to %ld to remove the assumption about the size of a long. Similarly, use %z with size_t arguments.
Where the value being printed is an unsigned 64-bit value, use PRIu64 instead of %ld.
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io> Change-Id: I0ec4c0cb5e7a8f4b94a1ee6272c8df9ee7f06aa6 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5141 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
show more ...
|
|
Revision tags: v20.10, v20.10-rc1 |
|
| #
2eda3fa0 |
| 12-Oct-2020 |
Tomasz Zawadzki <tomasz.zawadzki@intel.com> |
module/null: remove legacy config support
This patch removes legacy config support in null bdev module. All options through the legacy config are already reflected in JSON.
While here, added alloca
module/null: remove legacy config support
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>
show more ...
|