1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright (c) Intel Corporation. 3 * All rights reserved. 4 */ 5 6 #ifndef FTL_SB_CURRENT_H 7 #define FTL_SB_CURRENT_H 8 9 #include "spdk/uuid.h" 10 #include "ftl_sb_common.h" 11 12 #define FTL_METADATA_VERSION_4 4 13 #define FTL_METADATA_VERSION_CURRENT FTL_METADATA_VERSION_4 14 15 struct ftl_superblock { 16 struct ftl_superblock_header header; 17 18 struct spdk_uuid uuid; 19 20 /* Flag describing clean shutdown */ 21 uint64_t clean; 22 23 /* Number of surfaced LBAs */ 24 uint64_t lba_cnt; 25 26 /* Percentage of base device blocks not exposed to the user */ 27 uint64_t overprovisioning; 28 29 /* Maximum IO depth per band relocate */ 30 uint64_t max_reloc_qdepth; 31 32 /* Reserved field */ 33 uint64_t reserved; 34 35 uint32_t reserved2; 36 37 struct ftl_superblock_gc_info gc_info; 38 39 struct ftl_superblock_md_region md_layout_head; 40 }; 41 42 SPDK_STATIC_ASSERT(offsetof(struct ftl_superblock, header) == 0, 43 "Invalid placement of header"); 44 45 SPDK_STATIC_ASSERT(FTL_SUPERBLOCK_SIZE >= sizeof(struct ftl_superblock), 46 "FTL SB metadata size is invalid"); 47 48 #endif /* FTL_SB_CURRENT_H */ 49