1
2
3
4
5
6
7 #ifndef DM_SPACE_MAP_METADATA_H
8 #define DM_SPACE_MAP_METADATA_H
9
10 #include "dm-transaction-manager.h"
11
12 #define DM_SM_METADATA_BLOCK_SIZE (4096 >> SECTOR_SHIFT)
13
14
15
16
17
18
19
20 #define DM_SM_METADATA_MAX_BLOCKS (255 * ((1 << 14) - 64))
21 #define DM_SM_METADATA_MAX_SECTORS (DM_SM_METADATA_MAX_BLOCKS * DM_SM_METADATA_BLOCK_SIZE)
22
23
24
25
26
27 struct dm_space_map *dm_sm_metadata_init(void);
28
29
30
31
32 int dm_sm_metadata_create(struct dm_space_map *sm,
33 struct dm_transaction_manager *tm,
34 dm_block_t nr_blocks,
35 dm_block_t superblock);
36
37
38
39
40 int dm_sm_metadata_open(struct dm_space_map *sm,
41 struct dm_transaction_manager *tm,
42 void *root_le, size_t len);
43
44 #endif