-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathftl_data.h
More file actions
77 lines (61 loc) · 1.14 KB
/
ftl_data.h
File metadata and controls
77 lines (61 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#ifndef __BLOOMDATA__
#define __BLOOMDATA__
#include <stdint.h>
typedef struct {
uint32_t k;
uint64_t m;
uint64_t targetsize;
int n;
float p;
char* body;
uint64_t start; // start index of BF
} BF;
typedef struct {
int* num_bf;
} SBlkManager;
typedef struct {
uint32_t page;
uint32_t oob;
} Page;
typedef struct {
Page* page_arr;
} Block;
typedef struct {
Block** data_blk;
int* empty;
} Chip;
typedef struct {
Chip** chip_arr;
} Storage;
typedef struct {
BF** bfchip_arr;
} GlobalBF;
typedef struct {
uint64_t* bits_per_pg;
uint64_t* bytes_arr;
} BFManager;
// Symbol
typedef struct {
uint8_t*** symbol;
int** lba_flag;
int** ppa_flag; // TODO: must change to bit array
} GlobalSymb;
typedef struct {
uint64_t sym_bytes_total;
uint64_t dead_bytes_total;
uint64_t sym_bits_chip; // 1 chip
uint64_t sym_bits_blk; // 1 block
uint64_t sym_bits_super_blk; // 1 superblk
uint64_t* sym_bits_pg;
uint64_t sym_bits_total;
uint64_t* new_pidx_start;
uint64_t* sym_start; // bit unit
} SManager;
#if BUFFERED
typedef struct {
uint32_t* lba;
uint32_t* value;
int buf_sz;
} BlockBuffer; // TODO: change to struct Page
#endif
#endif