nvmf: remove unnecessary nvmf.h

The function call of spdk_nvmf_check_pools can be
directly put in nvmf.c.

Reason: This pool is created by nvmf subsystem,
it should be recycled by this subsystem.

Change-Id: I49e49bcb56079fc25d26b1f5078a1808c2f8e189
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
This commit is contained in:
Ziye Yang 2016-06-28 10:32:34 +08:00 committed by Daniel Verkamp
parent 20f9d86541
commit 88669436f9
9 changed files with 6 additions and 62 deletions

View File

@ -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;
}

View File

@ -45,7 +45,6 @@
#include <rte_cycles.h>
#include <rte_timer.h>
#include "nvmf.h"
#include "spdk/nvmf_spec.h"
#include "conn.h"
#include "rdma.h"

View File

@ -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;
}

View File

@ -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 <stdbool.h>
#include <stdint.h>
/**
* \file
*
*/
int
spdk_nvmf_check_pools(void);
#endif /* __NVMF_H__ */

View File

@ -34,8 +34,6 @@
#ifndef __NVMF_INTERNAL_H__
#define __NVMF_INTERNAL_H__
#include "nvmf.h"
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>

View File

@ -35,7 +35,6 @@
#include <rte_debug.h>
#include "conn.h"
#include "nvmf.h"
#include "rdma.h"
#include "port.h"
#include "spdk/log.h"

View File

@ -47,7 +47,6 @@
#include "conn.h"
#include "rdma.h"
#include "nvmf.h"
#include "port.h"
#include "host.h"
#include "spdk/assert.h"

View File

@ -34,7 +34,6 @@
#include <string.h>
#include "session.h"
#include "nvmf.h"
#include "nvmf_internal.h"
#include "subsystem_grp.h"
#include "spdk/log.h"

View File

@ -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"