numam-spdk/lib/bdev/Makefile

51 lines
2.0 KiB
Makefile
Raw Normal View History

#
# 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.
#
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
SO_VER := 4
SO_MINOR := 1
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