Commit 5c3591c7 authored by Wojciech Malikowski's avatar Wojciech Malikowski Committed by Jim Harris
Browse files

ftl: Added initialization module



This patch adds OCSSD device initialization consisting of the
following:
 * retrieving SSD's geometry and its state
 * verifying configuration
 * initializing core structures (L2P, bands, write buffer, write
 pointers, bad block tables, etc)
 * initializing threads

Change-Id: Ieb643f78035702e834b9ef7830a3db215e35bfb7
Signed-off-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Signed-off-by: default avatarWojciech Malikowski <wojciech.malikowski@intel.com>
Signed-off-by: default avatarJakub Radtke <jakub.radtke@intel.com>
Signed-off-by: default avatarMateusz Kozlowski <mateusz.kozlowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/431326


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 8b9ccc14
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -72,9 +72,6 @@ struct spdk_ftl_conf {
	/* Trace enabled flag */
	int					trace;

	/* Trace file name */
	const char				*trace_path;

	/* Maximum IO depth per band relocate */
	size_t					max_reloc_qdepth;

+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk

C_SRCS = ftl_band.c ftl_core.c ftl_debug.c ftl_io.c ftl_rwb.c ftl_reloc.c \
	 ftl_anm.c  ftl_restore.c
	 ftl_anm.c  ftl_restore.c ftl_init.c

LIBNAME = ftl

+2 −2
Original line number Diff line number Diff line
@@ -321,13 +321,13 @@ _ftl_io_erase(void *ctx)
static bool
ftl_check_core_thread(const struct spdk_ftl_dev *dev)
{
	return dev->core_thread.tid == pthread_self();
	return dev->core_thread.thread == spdk_get_thread();
}

static bool
ftl_check_read_thread(const struct spdk_ftl_dev *dev)
{
	return dev->read_thread.tid == pthread_self();
	return dev->read_thread.thread == spdk_get_thread();
}

int
+0 −2
Original line number Diff line number Diff line
@@ -86,8 +86,6 @@ struct ftl_thread {

	/* Thread on which the poller is running */
	struct spdk_thread			*thread;
	/* Thread id */
	pthread_t				tid;

	/* Poller */
	struct spdk_poller			*poller;

lib/ftl/ftl_init.c

0 → 100644
+1055 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading