diff options
Diffstat (limited to 'fs/nilfs2/nilfs.h')
-rw-r--r-- | fs/nilfs2/nilfs.h | 49 |
1 files changed, 19 insertions, 30 deletions
diff --git a/fs/nilfs2/nilfs.h b/fs/nilfs2/nilfs.h index d3d54046e5f8..777e8fd04304 100644 --- a/fs/nilfs2/nilfs.h +++ b/fs/nilfs2/nilfs.h | |||
@@ -59,6 +59,7 @@ struct nilfs_inode_info { | |||
59 | #endif | 59 | #endif |
60 | struct buffer_head *i_bh; /* i_bh contains a new or dirty | 60 | struct buffer_head *i_bh; /* i_bh contains a new or dirty |
61 | disk inode */ | 61 | disk inode */ |
62 | struct nilfs_root *i_root; | ||
62 | struct inode vfs_inode; | 63 | struct inode vfs_inode; |
63 | }; | 64 | }; |
64 | 65 | ||
@@ -100,7 +101,6 @@ enum { | |||
100 | NILFS_I_INODE_DIRTY, /* write_inode is requested */ | 101 | NILFS_I_INODE_DIRTY, /* write_inode is requested */ |
101 | NILFS_I_BMAP, /* has bmap and btnode_cache */ | 102 | NILFS_I_BMAP, /* has bmap and btnode_cache */ |
102 | NILFS_I_GCINODE, /* inode for GC, on memory only */ | 103 | NILFS_I_GCINODE, /* inode for GC, on memory only */ |
103 | NILFS_I_GCDAT, /* shadow DAT, on memory only */ | ||
104 | }; | 104 | }; |
105 | 105 | ||
106 | /* | 106 | /* |
@@ -190,22 +190,14 @@ static inline int nilfs_doing_construction(void) | |||
190 | return nilfs_test_transaction_flag(NILFS_TI_WRITER); | 190 | return nilfs_test_transaction_flag(NILFS_TI_WRITER); |
191 | } | 191 | } |
192 | 192 | ||
193 | static inline struct inode *nilfs_dat_inode(const struct the_nilfs *nilfs) | ||
194 | { | ||
195 | return nilfs_doing_gc() ? nilfs->ns_gc_dat : nilfs->ns_dat; | ||
196 | } | ||
197 | |||
198 | /* | 193 | /* |
199 | * function prototype | 194 | * function prototype |
200 | */ | 195 | */ |
201 | #ifdef CONFIG_NILFS_POSIX_ACL | 196 | #ifdef CONFIG_NILFS_POSIX_ACL |
202 | #error "NILFS: not yet supported POSIX ACL" | 197 | #error "NILFS: not yet supported POSIX ACL" |
203 | extern int nilfs_permission(struct inode *, int, struct nameidata *); | ||
204 | extern int nilfs_acl_chmod(struct inode *); | 198 | extern int nilfs_acl_chmod(struct inode *); |
205 | extern int nilfs_init_acl(struct inode *, struct inode *); | 199 | extern int nilfs_init_acl(struct inode *, struct inode *); |
206 | #else | 200 | #else |
207 | #define nilfs_permission NULL | ||
208 | |||
209 | static inline int nilfs_acl_chmod(struct inode *inode) | 201 | static inline int nilfs_acl_chmod(struct inode *inode) |
210 | { | 202 | { |
211 | return 0; | 203 | return 0; |
@@ -247,24 +239,28 @@ extern int nilfs_get_block(struct inode *, sector_t, struct buffer_head *, int); | |||
247 | extern void nilfs_set_inode_flags(struct inode *); | 239 | extern void nilfs_set_inode_flags(struct inode *); |
248 | extern int nilfs_read_inode_common(struct inode *, struct nilfs_inode *); | 240 | extern int nilfs_read_inode_common(struct inode *, struct nilfs_inode *); |
249 | extern void nilfs_write_inode_common(struct inode *, struct nilfs_inode *, int); | 241 | extern void nilfs_write_inode_common(struct inode *, struct nilfs_inode *, int); |
250 | extern struct inode *nilfs_iget(struct super_block *, unsigned long); | 242 | struct inode *nilfs_ilookup(struct super_block *sb, struct nilfs_root *root, |
243 | unsigned long ino); | ||
244 | struct inode *nilfs_iget_locked(struct super_block *sb, struct nilfs_root *root, | ||
245 | unsigned long ino); | ||
246 | struct inode *nilfs_iget(struct super_block *sb, struct nilfs_root *root, | ||
247 | unsigned long ino); | ||
248 | extern struct inode *nilfs_iget_for_gc(struct super_block *sb, | ||
249 | unsigned long ino, __u64 cno); | ||
251 | extern void nilfs_update_inode(struct inode *, struct buffer_head *); | 250 | extern void nilfs_update_inode(struct inode *, struct buffer_head *); |
252 | extern void nilfs_truncate(struct inode *); | 251 | extern void nilfs_truncate(struct inode *); |
253 | extern void nilfs_evict_inode(struct inode *); | 252 | extern void nilfs_evict_inode(struct inode *); |
254 | extern int nilfs_setattr(struct dentry *, struct iattr *); | 253 | extern int nilfs_setattr(struct dentry *, struct iattr *); |
255 | extern int nilfs_load_inode_block(struct nilfs_sb_info *, struct inode *, | 254 | int nilfs_permission(struct inode *inode, int mask, unsigned int flags); |
256 | struct buffer_head **); | 255 | int nilfs_load_inode_block(struct inode *inode, struct buffer_head **pbh); |
257 | extern int nilfs_inode_dirty(struct inode *); | 256 | extern int nilfs_inode_dirty(struct inode *); |
258 | extern int nilfs_set_file_dirty(struct nilfs_sb_info *, struct inode *, | 257 | int nilfs_set_file_dirty(struct inode *inode, unsigned nr_dirty); |
259 | unsigned); | ||
260 | extern int nilfs_mark_inode_dirty(struct inode *); | 258 | extern int nilfs_mark_inode_dirty(struct inode *); |
261 | extern void nilfs_dirty_inode(struct inode *); | 259 | extern void nilfs_dirty_inode(struct inode *); |
262 | 260 | int nilfs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, | |
263 | /* namei.c */ | 261 | __u64 start, __u64 len); |
264 | extern struct dentry *nilfs_get_parent(struct dentry *); | ||
265 | 262 | ||
266 | /* super.c */ | 263 | /* super.c */ |
267 | extern struct inode *nilfs_alloc_inode_common(struct the_nilfs *); | ||
268 | extern struct inode *nilfs_alloc_inode(struct super_block *); | 264 | extern struct inode *nilfs_alloc_inode(struct super_block *); |
269 | extern void nilfs_destroy_inode(struct inode *); | 265 | extern void nilfs_destroy_inode(struct inode *); |
270 | extern void nilfs_error(struct super_block *, const char *, const char *, ...) | 266 | extern void nilfs_error(struct super_block *, const char *, const char *, ...) |
@@ -283,8 +279,9 @@ extern struct nilfs_super_block **nilfs_prepare_super(struct nilfs_sb_info *, | |||
283 | int flip); | 279 | int flip); |
284 | extern int nilfs_commit_super(struct nilfs_sb_info *, int); | 280 | extern int nilfs_commit_super(struct nilfs_sb_info *, int); |
285 | extern int nilfs_cleanup_super(struct nilfs_sb_info *); | 281 | extern int nilfs_cleanup_super(struct nilfs_sb_info *); |
286 | extern int nilfs_attach_checkpoint(struct nilfs_sb_info *, __u64); | 282 | int nilfs_attach_checkpoint(struct nilfs_sb_info *sbi, __u64 cno, int curr_mnt, |
287 | extern void nilfs_detach_checkpoint(struct nilfs_sb_info *); | 283 | struct nilfs_root **root); |
284 | int nilfs_checkpoint_is_mounted(struct super_block *sb, __u64 cno); | ||
288 | 285 | ||
289 | /* gcinode.c */ | 286 | /* gcinode.c */ |
290 | int nilfs_gccache_submit_read_data(struct inode *, sector_t, sector_t, __u64, | 287 | int nilfs_gccache_submit_read_data(struct inode *, sector_t, sector_t, __u64, |
@@ -292,16 +289,8 @@ int nilfs_gccache_submit_read_data(struct inode *, sector_t, sector_t, __u64, | |||
292 | int nilfs_gccache_submit_read_node(struct inode *, sector_t, __u64, | 289 | int nilfs_gccache_submit_read_node(struct inode *, sector_t, __u64, |
293 | struct buffer_head **); | 290 | struct buffer_head **); |
294 | int nilfs_gccache_wait_and_mark_dirty(struct buffer_head *); | 291 | int nilfs_gccache_wait_and_mark_dirty(struct buffer_head *); |
295 | int nilfs_init_gccache(struct the_nilfs *); | 292 | int nilfs_init_gcinode(struct inode *inode); |
296 | void nilfs_destroy_gccache(struct the_nilfs *); | 293 | void nilfs_remove_all_gcinodes(struct the_nilfs *nilfs); |
297 | void nilfs_clear_gcinode(struct inode *); | ||
298 | struct inode *nilfs_gc_iget(struct the_nilfs *, ino_t, __u64); | ||
299 | void nilfs_remove_all_gcinode(struct the_nilfs *); | ||
300 | |||
301 | /* gcdat.c */ | ||
302 | int nilfs_init_gcdat_inode(struct the_nilfs *); | ||
303 | void nilfs_commit_gcdat_inode(struct the_nilfs *); | ||
304 | void nilfs_clear_gcdat_inode(struct the_nilfs *); | ||
305 | 294 | ||
306 | /* | 295 | /* |
307 | * Inodes and files operations | 296 | * Inodes and files operations |