diff --git a/app/nvmf_tgt/nvmf_tgt.c b/app/nvmf_tgt/nvmf_tgt.c index 03243af534..1ee0b37290 100644 --- a/app/nvmf_tgt/nvmf_tgt.c +++ b/app/nvmf_tgt/nvmf_tgt.c @@ -48,7 +48,6 @@ #include "nvmf/rdma.h" #include "nvmf/port.h" #include "nvmf/host.h" -#include "nvmf/nvmf.h" #include "spdk/log.h" #include "spdk/nvme.h" @@ -232,9 +231,5 @@ main(int argc, char **argv) spdk_app_fini(); - if (spdk_nvmf_check_pools() != 0) { - rc = -1; - } - return rc; } diff --git a/lib/nvmf/conn.c b/lib/nvmf/conn.c index 387e575a10..a60d52dbb8 100644 --- a/lib/nvmf/conn.c +++ b/lib/nvmf/conn.c @@ -45,7 +45,6 @@ #include #include -#include "nvmf.h" #include "spdk/nvmf_spec.h" #include "conn.h" #include "rdma.h" diff --git a/lib/nvmf/nvmf.c b/lib/nvmf/nvmf.c index ee1870b70d..67a6a4bff5 100644 --- a/lib/nvmf/nvmf.c +++ b/lib/nvmf/nvmf.c @@ -38,7 +38,6 @@ #include "spdk/log.h" #include "spdk/conf.h" -#include "nvmf.h" #include "conf.h" #include "conn.h" #include "controller.h" @@ -122,7 +121,7 @@ static int spdk_nvmf_check_pool(struct rte_mempool *pool, uint32_t count) } } -int +static int spdk_nvmf_check_pools(void) { struct spdk_nvmf_globals *spdk_nvmf = &g_nvmf_tgt; @@ -273,6 +272,11 @@ nvmf_tgt_subsystem_fini(void) free(g_nvmf_tgt.nodebase); pthread_mutex_destroy(&g_nvmf_tgt.mutex); + + if (spdk_nvmf_check_pools() != 0) { + return -1; + } + return 0; } diff --git a/lib/nvmf/nvmf.h b/lib/nvmf/nvmf.h deleted file mode 100644 index fc03a67a95..0000000000 --- a/lib/nvmf/nvmf.h +++ /dev/null @@ -1,48 +0,0 @@ -/*- - * BSD LICENSE - * - * Copyright (c) Intel Corporation. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef __NVMF_H__ -#define __NVMF_H__ - -#include -#include - -/** - * \file - * - */ - -int -spdk_nvmf_check_pools(void); - -#endif /* __NVMF_H__ */ diff --git a/lib/nvmf/nvmf_internal.h b/lib/nvmf/nvmf_internal.h index 099e71e30e..3ec9e9adba 100644 --- a/lib/nvmf/nvmf_internal.h +++ b/lib/nvmf/nvmf_internal.h @@ -34,8 +34,6 @@ #ifndef __NVMF_INTERNAL_H__ #define __NVMF_INTERNAL_H__ -#include "nvmf.h" - #include #include #include diff --git a/lib/nvmf/port.c b/lib/nvmf/port.c index 02a5f79ccb..0a50309733 100644 --- a/lib/nvmf/port.c +++ b/lib/nvmf/port.c @@ -35,7 +35,6 @@ #include #include "conn.h" -#include "nvmf.h" #include "rdma.h" #include "port.h" #include "spdk/log.h" diff --git a/lib/nvmf/rdma.c b/lib/nvmf/rdma.c index e4fadbbb75..df877e2218 100644 --- a/lib/nvmf/rdma.c +++ b/lib/nvmf/rdma.c @@ -47,7 +47,6 @@ #include "conn.h" #include "rdma.h" -#include "nvmf.h" #include "port.h" #include "host.h" #include "spdk/assert.h" diff --git a/lib/nvmf/session.c b/lib/nvmf/session.c index bf1300f5bd..07bcb25821 100644 --- a/lib/nvmf/session.c +++ b/lib/nvmf/session.c @@ -34,7 +34,6 @@ #include #include "session.h" -#include "nvmf.h" #include "nvmf_internal.h" #include "subsystem_grp.h" #include "spdk/log.h" diff --git a/lib/nvmf/subsystem_grp.c b/lib/nvmf/subsystem_grp.c index a4ca375ea3..242f36e447 100644 --- a/lib/nvmf/subsystem_grp.c +++ b/lib/nvmf/subsystem_grp.c @@ -37,7 +37,6 @@ #include "port.h" #include "host.h" #include "nvmf_internal.h" -#include "nvmf.h" #include "session.h" #include "subsystem_grp.h" #include "spdk/log.h"