void SSD_INIT(void) { FTL_INIT(); #ifdef MONITOR_ON INIT_LOG_MANAGER(); #endif }
void FTL_INIT(void) { if(g_init == 0){ printf("[FTL_INIT] Start\n"); INIT_SSD_CONFIG(); INIT_DATA_BLOCK_MAPPING(); INIT_INVERSE_BLOCK_MAPPING(); INIT_VALID_ARRAY(); INIT_EMPTY_BLOCK_LIST(); INIT_SEQ_BLOCK_MAPPING(INIT); INIT_RAN_COLD_BLOCK_MAPPING(INIT); INIT_RAN_HOT_BLOCK_MAPPING(INIT); INIT_LOG_BLOCK_INDEX(); INIT_HOT_PAGE_LIST(); INIT_SEQ_LOG_MAPPING(INIT); INIT_RAN_COLD_LOG_MAPPING(INIT); INIT_RAN_HOT_LOG_MAPPING(INIT); INIT_PERF_CHECKER(); #ifdef FIRM_IO_BUFFER INIT_IO_BUFFER(); #endif #ifdef MONITOR_ON INIT_LOG_MANAGER(); #endif g_init = 1; #ifdef DEBUG_MODE3 fp_dbg3_ran = fopen("./data/l_dbg3_ran.txt","a"); fp_dbg3_1_ran = fopen("./data/l_dbg3_1_ran.txt","a"); #endif #ifdef DEBUG_MODE4 fp_dbg4_seq = fopen("./data/l_dbg4_seq.txt","a"); fp_dbg4_ran = fopen("./data/l_dbg4_ran.txt","a"); #endif #ifdef DEBUG_MODE5 fp_dbg5_seq = fopen("./data/l_dbg5_seq.txt","a"); fp_dbg5_ran = fopen("./data/l_dbg5_ran.txt","a"); #endif #ifdef DEBUG_MODE6 fp_dbg6_seq = fopen("./data/l_dbg6_seq.txt","a"); fp_dbg6_ran = fopen("./data/l_dbg6_ran.txt","a"); #endif #ifdef DEBUG_MODE8 fp_dbg8_seq = fopen("./data/l_dbg8_seq.txt","a"); fp_dbg8_ran = fopen("./data/l_dbg8_ran.txt","a"); #endif SSD_IO_INIT(); printf("[FTL_INIT] Complete\n"); } }