From beb6239f169ae31746a9897bc2bb942d4adc417c Mon Sep 17 00:00:00 2001 From: Jan Michalski Date: Thu, 26 Feb 2026 16:48:52 +0000 Subject: [PATCH 1/3] DAOS-18597 bio: allow SPDK reinitialization Ref: spdk/spdk@fba209c7324a11b9230533144c02e7a66bc738ea Ref: daos-stack/daos#16774 Signed-off-by: Jan Michalski --- src/bio/bio_xstream.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/bio/bio_xstream.c b/src/bio/bio_xstream.c index 3fe1dbdb319..2d426d079be 100644 --- a/src/bio/bio_xstream.c +++ b/src/bio/bio_xstream.c @@ -1710,6 +1710,19 @@ bio_xsctxt_init_by_config(struct common_cp_arg *cp_arg) return -DER_NOMEM; } + /** + * Initially, this was called internally spdk_subsystem_load_config() -> ... -> + * spdk_rpc_initialize(). However, since commit + * https://github.com/spdk/spdk/commit/fba209c7324a11b9230533144c02e7a66bc738ea (>=v24.01) + * SPDK_RPC_STARTUP has become the initial value of the underlaying global variable and it + * is no longer reset automatically. This makes no difference for applications that + * initialize SPDK only once during the lifetime of the process. But some BIO module + * consumers—such as DDB—expect to be able to initialize, finalize, and then reinitialize + * SPDK multiple times within the same process, for example when inspecting multiple pools + * sequentially. For those use cases, the RPC state must now be reset explicitly. + */ + spdk_rpc_set_state(SPDK_RPC_STARTUP); + D_ALLOC_PTR(init_arg); if (init_arg == NULL) { free(json_data); From 6b09d4fc47b40495a461ae5e176311d270bf78f1 Mon Sep 17 00:00:00 2001 From: Jan Michalski Date: Fri, 27 Feb 2026 14:33:59 +0000 Subject: [PATCH 2/3] DAOS-18597 bio: underlaying ==> underlying Signed-off-by: Jan Michalski --- src/bio/bio_xstream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bio/bio_xstream.c b/src/bio/bio_xstream.c index 2d426d079be..043ba121ece 100644 --- a/src/bio/bio_xstream.c +++ b/src/bio/bio_xstream.c @@ -1714,7 +1714,7 @@ bio_xsctxt_init_by_config(struct common_cp_arg *cp_arg) * Initially, this was called internally spdk_subsystem_load_config() -> ... -> * spdk_rpc_initialize(). However, since commit * https://github.com/spdk/spdk/commit/fba209c7324a11b9230533144c02e7a66bc738ea (>=v24.01) - * SPDK_RPC_STARTUP has become the initial value of the underlaying global variable and it + * SPDK_RPC_STARTUP has become the initial value of the underlying global variable and it * is no longer reset automatically. This makes no difference for applications that * initialize SPDK only once during the lifetime of the process. But some BIO module * consumers—such as DDB—expect to be able to initialize, finalize, and then reinitialize From 7f80bafaf409f520f590c3226519482b4fe33a0a Mon Sep 17 00:00:00 2001 From: Jan Michalski Date: Fri, 27 Feb 2026 14:47:28 +0000 Subject: [PATCH 3/3] DAOS-18597 common: debug SPDK + logs Signed-off-by: Jan Michalski --- site_scons/components/__init__.py | 1 + src/bio/bio_xstream.c | 1 + 2 files changed, 2 insertions(+) diff --git a/site_scons/components/__init__.py b/site_scons/components/__init__.py index f6ab99d6245..5932f4e0402 100644 --- a/site_scons/components/__init__.py +++ b/site_scons/components/__init__.py @@ -382,6 +382,7 @@ def define_components(reqs): '--with-shared', '--without-nvme-cuse', '--without-crypto', + '--enable-debug', f'--target-arch={spdk_arch}'] + spdk_conf, ['make', f'CONFIG_ARCH={spdk_arch}'], ['make', 'libdir=$SPDK_PREFIX/lib64/daos_srv', diff --git a/src/bio/bio_xstream.c b/src/bio/bio_xstream.c index 043ba121ece..cb98b1fcba1 100644 --- a/src/bio/bio_xstream.c +++ b/src/bio/bio_xstream.c @@ -176,6 +176,7 @@ bio_spdk_env_init(void) /* Set SPDK log print level to configured value */ spdk_log_set_print_level(spdk_level); + spdk_log_set_flag("all"); /* Build DPDK options with specified log level for all DPDK log facilities */ dpdk_opts = dpdk_cli_build_opts(dpdk_level, dpdk_level);