diff options
Diffstat (limited to 'fs/nilfs2/mdt.h')
-rw-r--r-- | fs/nilfs2/mdt.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/nilfs2/mdt.h b/fs/nilfs2/mdt.h index f44560224bd1..e7f0d158c527 100644 --- a/fs/nilfs2/mdt.h +++ b/fs/nilfs2/mdt.h | |||
@@ -28,6 +28,13 @@ | |||
28 | #include "nilfs.h" | 28 | #include "nilfs.h" |
29 | #include "page.h" | 29 | #include "page.h" |
30 | 30 | ||
31 | struct nilfs_shadow_map { | ||
32 | struct nilfs_bmap_store bmap_store; | ||
33 | struct address_space frozen_data; | ||
34 | struct address_space frozen_btnodes; | ||
35 | struct list_head frozen_buffers; | ||
36 | }; | ||
37 | |||
31 | /** | 38 | /** |
32 | * struct nilfs_mdt_info - on-memory private data of meta data files | 39 | * struct nilfs_mdt_info - on-memory private data of meta data files |
33 | * @mi_nilfs: back pointer to the_nilfs struct | 40 | * @mi_nilfs: back pointer to the_nilfs struct |
@@ -37,6 +44,7 @@ | |||
37 | * @mi_first_entry_offset: offset to the first entry | 44 | * @mi_first_entry_offset: offset to the first entry |
38 | * @mi_entries_per_block: number of entries in a block | 45 | * @mi_entries_per_block: number of entries in a block |
39 | * @mi_palloc_cache: persistent object allocator cache | 46 | * @mi_palloc_cache: persistent object allocator cache |
47 | * @mi_shadow: shadow of bmap and page caches | ||
40 | * @mi_blocks_per_group: number of blocks in a group | 48 | * @mi_blocks_per_group: number of blocks in a group |
41 | * @mi_blocks_per_desc_block: number of blocks per descriptor block | 49 | * @mi_blocks_per_desc_block: number of blocks per descriptor block |
42 | */ | 50 | */ |
@@ -48,6 +56,7 @@ struct nilfs_mdt_info { | |||
48 | unsigned mi_first_entry_offset; | 56 | unsigned mi_first_entry_offset; |
49 | unsigned long mi_entries_per_block; | 57 | unsigned long mi_entries_per_block; |
50 | struct nilfs_palloc_cache *mi_palloc_cache; | 58 | struct nilfs_palloc_cache *mi_palloc_cache; |
59 | struct nilfs_shadow_map *mi_shadow; | ||
51 | unsigned long mi_blocks_per_group; | 60 | unsigned long mi_blocks_per_group; |
52 | unsigned long mi_blocks_per_desc_block; | 61 | unsigned long mi_blocks_per_desc_block; |
53 | }; | 62 | }; |
@@ -86,6 +95,11 @@ void nilfs_mdt_destroy(struct inode *); | |||
86 | void nilfs_mdt_set_entry_size(struct inode *, unsigned, unsigned); | 95 | void nilfs_mdt_set_entry_size(struct inode *, unsigned, unsigned); |
87 | void nilfs_mdt_set_shadow(struct inode *, struct inode *); | 96 | void nilfs_mdt_set_shadow(struct inode *, struct inode *); |
88 | 97 | ||
98 | int nilfs_mdt_setup_shadow_map(struct inode *inode, | ||
99 | struct nilfs_shadow_map *shadow); | ||
100 | int nilfs_mdt_save_to_shadow_map(struct inode *inode); | ||
101 | void nilfs_mdt_restore_from_shadow_map(struct inode *inode); | ||
102 | void nilfs_mdt_clear_shadow_map(struct inode *inode); | ||
89 | 103 | ||
90 | #define nilfs_mdt_mark_buffer_dirty(bh) nilfs_mark_buffer_dirty(bh) | 104 | #define nilfs_mdt_mark_buffer_dirty(bh) nilfs_mark_buffer_dirty(bh) |
91 | 105 | ||