Spdk/lib/bdev/Makefile

23 lines
532 B
Makefile
Raw Normal View History

# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) Intel Corporation.
# All rights reserved.
#
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
SO_VER := 10
SO_MINOR := 0
ifeq ($(CONFIG_VTUNE),y)
CFLAGS += -I$(CONFIG_VTUNE_DIR)/include -I$(CONFIG_VTUNE_DIR)/sdk/src/ittnotify
endif
lib/bdev: Zoned bdev public header Added new public header for zoned bdev. Zoned bdev is an extension of the bdev interface. Generic concept comes from ATA/SCSI and is also being worked as an NVMe TP. Zoned device logical blocks space is divided into fixed-sized zones. Each zone is described by its start logical block address and capacity. Writes to a single zone need to be sequential. After zone is fully written it need to be reset to write to it again. Such writing schema could be very beneficial in terms of write amplification factor for NAND based devices. SPDK Flash Translation Layer library will be consuming this interface in the future. Extending SPDK bdev interface will allow to use existing bdev infrastructure for this new type of devices. Zoned device have several properties defined in spdk_bdev structure: - zone_size: default size of each zone - max_open_zone: maximum number of open zones - optimal_open_zones: optimal number of open zones to get best performance on writes Single zone properties are defined in spdk_bdev_zone_info structure: - start_lba: first logical block of z zone - write_pointer: logical block address in the zone at which next write shall occur. - capacity: maximum number of logical blocks that may be written in the zone when zone is empty. - state: zone state Several zone states are defined: Empty, Open, Full, Closed, Read Only and Offline. To change zone state zone actions are defined: Close, Finish, Open and Reset. Change-Id: I5fcc22d548c15743329344cae96f5ff73e268504 Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460642 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2019-07-05 10:17:55 +00:00
C_SRCS = bdev.c bdev_rpc.c bdev_zone.c part.c scsi_nvme.c
C_SRCS-$(CONFIG_VTUNE) += vtune.c
LIBNAME = bdev
SPDK_MAP_FILE = $(abspath $(CURDIR)/spdk_bdev.map)
include $(SPDK_ROOT_DIR)/mk/spdk.lib.mk