diff --git a/lib/nvmf/subsystem.c b/lib/nvmf/subsystem.c index 457fa64d6b..be9c12342e 100644 --- a/lib/nvmf/subsystem.c +++ b/lib/nvmf/subsystem.c @@ -44,6 +44,7 @@ #include "spdk/json.h" #include "spdk/file.h" +#define __SPDK_BDEV_MODULE_ONLY #include "spdk/bdev_module.h" #include "spdk/log.h" #include "spdk_internal/utf.h" @@ -1320,7 +1321,7 @@ nvmf_ns_event(enum spdk_bdev_event_type type, { SPDK_DEBUGLOG(nvmf, "Bdev event: type %d, name %s, subsystem_id %d, ns_id %d\n", type, - bdev->name, + spdk_bdev_get_name(bdev), ((struct spdk_nvmf_ns *)event_ctx)->subsystem->id, ((struct spdk_nvmf_ns *)event_ctx)->nsid); diff --git a/test/unit/lib/nvmf/fc.c/fc_ut.c b/test/unit/lib/nvmf/fc.c/fc_ut.c index a7603a7bcf..5605057677 100644 --- a/test/unit/lib/nvmf/fc.c/fc_ut.c +++ b/test/unit/lib/nvmf/fc.c/fc_ut.c @@ -51,6 +51,7 @@ #include "json/json_write.c" #include "nvmf/nvmf.c" #include "nvmf/transport.c" +#include "spdk/bdev_module.h" #include "nvmf/subsystem.c" #include "nvmf/fc.c" #include "nvmf/fc_ls.c" diff --git a/test/unit/lib/nvmf/subsystem.c/subsystem_ut.c b/test/unit/lib/nvmf/subsystem.c/subsystem_ut.c index 3263eeb66b..2c113acd50 100644 --- a/test/unit/lib/nvmf/subsystem.c/subsystem_ut.c +++ b/test/unit/lib/nvmf/subsystem.c/subsystem_ut.c @@ -37,6 +37,7 @@ #include "spdk_cunit.h" #include "spdk_internal/mock.h" +#include "spdk/bdev_module.h" #include "nvmf/subsystem.c" SPDK_LOG_REGISTER_COMPONENT(nvmf)