Commit 336505ab authored by Konrad Sztyber's avatar Konrad Sztyber Committed by Tomasz Zawadzki
Browse files

lib/ftl: use per-io_channel write buffers



Replaced single global write buffer with the per-io_channel write
buffers.  This means that the "rwb" module and all of its references
were removed and replaced with the recently added interfaces.

Change-Id: Idc899d3a4d63a8a2bede1ac26549ed06e9a2e784
Signed-off-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/909


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarWojciech Malikowski <wojciech.malikowski@intel.com>
parent 925cc3b8
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -66,8 +66,8 @@ struct spdk_ftl_conf {
	/* Number of reserved addresses not exposed to the user */
	size_t					lba_rsvd;

	/* Write buffer size */
	size_t					rwb_size;
	/* Size of the per-io_channel write buffer */
	size_t					write_buffer_size;

	/* Threshold for opening new band */
	size_t					band_thld;
@@ -87,9 +87,6 @@ struct spdk_ftl_conf {
	/* User writes limits */
	struct spdk_ftl_limit			limits[SPDK_FTL_LIMIT_MAX];

	/* Number of interleaving units per ws_opt */
	size_t                                  num_interleave_units;

	/* Allow for partial recovery from open bands instead of returning error */
	bool					allow_open_bands;

+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,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 \
C_SRCS = ftl_band.c ftl_core.c ftl_debug.c ftl_io.c ftl_reloc.c \
	 ftl_restore.c ftl_init.c ftl_trace.c

LIBNAME = ftl
+0 −2
Original line number Diff line number Diff line
@@ -698,7 +698,6 @@ ftl_io_init_md_read(struct spdk_ftl_dev *dev, struct ftl_addr addr,
	struct ftl_io_init_opts opts = {
		.dev		= dev,
		.io		= NULL,
		.rwb_batch	= NULL,
		.band		= band,
		.size		= sizeof(*io),
		.flags		= FTL_IO_MD | FTL_IO_PHYSICAL_MODE,
@@ -734,7 +733,6 @@ ftl_io_init_md_write(struct spdk_ftl_dev *dev, struct ftl_band *band,
	struct ftl_io_init_opts opts = {
		.dev		= dev,
		.io		= NULL,
		.rwb_batch	= NULL,
		.band		= band,
		.size		= sizeof(struct ftl_io),
		.flags		= FTL_IO_MD | FTL_IO_PHYSICAL_MODE,
+138 −165

File changed.

Preview size limit exceeded, changes collapsed.

+1 −3
Original line number Diff line number Diff line
@@ -193,8 +193,6 @@ struct spdk_ftl_dev {

	/* Transfer unit size */
	size_t					xfer_size;
	/* Ring write buffer */
	struct ftl_rwb				*rwb;

	/* Current user write limit */
	int					limit;
@@ -271,7 +269,7 @@ typedef void (*ftl_restore_fn)(struct ftl_restore *, int, void *cb_arg);
void	ftl_apply_limits(struct spdk_ftl_dev *dev);
void	ftl_io_read(struct ftl_io *io);
void	ftl_io_write(struct ftl_io *io);
int	ftl_flush_rwb(struct spdk_ftl_dev *dev, spdk_ftl_fn cb_fn, void *cb_arg);
int	ftl_flush_wbuf(struct spdk_ftl_dev *dev, spdk_ftl_fn cb_fn, void *cb_arg);
int	ftl_current_limit(const struct spdk_ftl_dev *dev);
int	ftl_invalidate_addr(struct spdk_ftl_dev *dev, struct ftl_addr addr);
int	ftl_task_core(void *ctx);
Loading