1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright (c) Intel Corporation. 3 * All rights reserved. 4 */ 5 6 #ifndef FTL_INTERNAL_H 7 #define FTL_INTERNAL_H 8 9 #include "spdk/stdinc.h" 10 #include "spdk/crc32.h" 11 #include "spdk/util.h" 12 #include "spdk/uuid.h" 13 14 /* Marks address as invalid */ 15 #define FTL_ADDR_INVALID ((ftl_addr)-1) 16 /* Marks LBA as invalid */ 17 #define FTL_LBA_INVALID ((uint64_t)-1) 18 /* Smallest data unit size */ 19 #define FTL_BLOCK_SIZE 4096ULL 20 21 /* 22 * This type represents address in the ftl address space. Values from 0 to based bdev size are 23 * mapped directly to base device lbas. Values above that represent nv cache lbas. 24 */ 25 typedef uint64_t ftl_addr; 26 27 /* Number of LBAs that could be stored in a single block */ 28 #define FTL_NUM_LBA_IN_BLOCK (FTL_BLOCK_SIZE / sizeof(uint64_t)) 29 30 #endif /* FTL_INTERNAL_H */ 31