diff options
Diffstat (limited to 'fs/nilfs2/mdt.h')
| -rw-r--r-- | fs/nilfs2/mdt.h | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/fs/nilfs2/mdt.h b/fs/nilfs2/mdt.h index 431599733c9b..6c4bbb0470fc 100644 --- a/fs/nilfs2/mdt.h +++ b/fs/nilfs2/mdt.h | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | * @mi_entry_size: size of an entry | 36 | * @mi_entry_size: size of an entry |
| 37 | * @mi_first_entry_offset: offset to the first entry | 37 | * @mi_first_entry_offset: offset to the first entry |
| 38 | * @mi_entries_per_block: number of entries in a block | 38 | * @mi_entries_per_block: number of entries in a block |
| 39 | * @mi_palloc_cache: persistent object allocator cache | ||
| 39 | * @mi_blocks_per_group: number of blocks in a group | 40 | * @mi_blocks_per_group: number of blocks in a group |
| 40 | * @mi_blocks_per_desc_block: number of blocks per descriptor block | 41 | * @mi_blocks_per_desc_block: number of blocks per descriptor block |
| 41 | */ | 42 | */ |
| @@ -46,6 +47,7 @@ struct nilfs_mdt_info { | |||
| 46 | unsigned mi_entry_size; | 47 | unsigned mi_entry_size; |
| 47 | unsigned mi_first_entry_offset; | 48 | unsigned mi_first_entry_offset; |
| 48 | unsigned long mi_entries_per_block; | 49 | unsigned long mi_entries_per_block; |
| 50 | struct nilfs_palloc_cache *mi_palloc_cache; | ||
| 49 | unsigned long mi_blocks_per_group; | 51 | unsigned long mi_blocks_per_group; |
| 50 | unsigned long mi_blocks_per_desc_block; | 52 | unsigned long mi_blocks_per_desc_block; |
| 51 | }; | 53 | }; |
| @@ -74,11 +76,11 @@ int nilfs_mdt_forget_block(struct inode *, unsigned long); | |||
| 74 | int nilfs_mdt_mark_block_dirty(struct inode *, unsigned long); | 76 | int nilfs_mdt_mark_block_dirty(struct inode *, unsigned long); |
| 75 | int nilfs_mdt_fetch_dirty(struct inode *); | 77 | int nilfs_mdt_fetch_dirty(struct inode *); |
| 76 | 78 | ||
| 77 | struct inode *nilfs_mdt_new(struct the_nilfs *, struct super_block *, ino_t); | 79 | struct inode *nilfs_mdt_new(struct the_nilfs *, struct super_block *, ino_t, |
| 80 | size_t); | ||
| 78 | struct inode *nilfs_mdt_new_common(struct the_nilfs *, struct super_block *, | 81 | struct inode *nilfs_mdt_new_common(struct the_nilfs *, struct super_block *, |
| 79 | ino_t, gfp_t); | 82 | ino_t, gfp_t, size_t); |
| 80 | void nilfs_mdt_destroy(struct inode *); | 83 | void nilfs_mdt_destroy(struct inode *); |
| 81 | void nilfs_mdt_clear(struct inode *); | ||
| 82 | void nilfs_mdt_set_entry_size(struct inode *, unsigned, unsigned); | 84 | void nilfs_mdt_set_entry_size(struct inode *, unsigned, unsigned); |
| 83 | void nilfs_mdt_set_shadow(struct inode *, struct inode *); | 85 | void nilfs_mdt_set_shadow(struct inode *, struct inode *); |
| 84 | 86 | ||
| @@ -104,21 +106,4 @@ static inline __u64 nilfs_mdt_cno(struct inode *inode) | |||
| 104 | #define nilfs_mdt_bgl_lock(inode, bg) \ | 106 | #define nilfs_mdt_bgl_lock(inode, bg) \ |
| 105 | (&NILFS_MDT(inode)->mi_bgl->locks[(bg) & (NR_BG_LOCKS-1)].lock) | 107 | (&NILFS_MDT(inode)->mi_bgl->locks[(bg) & (NR_BG_LOCKS-1)].lock) |
| 106 | 108 | ||
| 107 | |||
| 108 | static inline int | ||
| 109 | nilfs_mdt_read_inode_direct(struct inode *inode, struct buffer_head *bh, | ||
| 110 | unsigned n) | ||
| 111 | { | ||
| 112 | return nilfs_read_inode_common( | ||
| 113 | inode, (struct nilfs_inode *)(bh->b_data + n)); | ||
| 114 | } | ||
| 115 | |||
| 116 | static inline void | ||
| 117 | nilfs_mdt_write_inode_direct(struct inode *inode, struct buffer_head *bh, | ||
| 118 | unsigned n) | ||
| 119 | { | ||
| 120 | nilfs_write_inode_common( | ||
| 121 | inode, (struct nilfs_inode *)(bh->b_data + n), 1); | ||
| 122 | } | ||
| 123 | |||
| 124 | #endif /* _NILFS_MDT_H */ | 109 | #endif /* _NILFS_MDT_H */ |
