aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/f2fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/f2fs/f2fs.h')
-rw-r--r--fs/f2fs/f2fs.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 13c6dfbb7183..c8e2d751ef9c 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -211,11 +211,11 @@ struct dnode_of_data {
211static inline void set_new_dnode(struct dnode_of_data *dn, struct inode *inode, 211static inline void set_new_dnode(struct dnode_of_data *dn, struct inode *inode,
212 struct page *ipage, struct page *npage, nid_t nid) 212 struct page *ipage, struct page *npage, nid_t nid)
213{ 213{
214 memset(dn, 0, sizeof(*dn));
214 dn->inode = inode; 215 dn->inode = inode;
215 dn->inode_page = ipage; 216 dn->inode_page = ipage;
216 dn->node_page = npage; 217 dn->node_page = npage;
217 dn->nid = nid; 218 dn->nid = nid;
218 dn->inode_page_locked = 0;
219} 219}
220 220
221/* 221/*
@@ -877,6 +877,8 @@ bool f2fs_empty_dir(struct inode *);
877 * super.c 877 * super.c
878 */ 878 */
879int f2fs_sync_fs(struct super_block *, int); 879int f2fs_sync_fs(struct super_block *, int);
880extern __printf(3, 4)
881void f2fs_msg(struct super_block *, const char *, const char *, ...);
880 882
881/* 883/*
882 * hash.c 884 * hash.c
@@ -912,7 +914,7 @@ int restore_node_summary(struct f2fs_sb_info *, unsigned int,
912void flush_nat_entries(struct f2fs_sb_info *); 914void flush_nat_entries(struct f2fs_sb_info *);
913int build_node_manager(struct f2fs_sb_info *); 915int build_node_manager(struct f2fs_sb_info *);
914void destroy_node_manager(struct f2fs_sb_info *); 916void destroy_node_manager(struct f2fs_sb_info *);
915int create_node_manager_caches(void); 917int __init create_node_manager_caches(void);
916void destroy_node_manager_caches(void); 918void destroy_node_manager_caches(void);
917 919
918/* 920/*
@@ -964,7 +966,7 @@ void sync_dirty_dir_inodes(struct f2fs_sb_info *);
964void block_operations(struct f2fs_sb_info *); 966void block_operations(struct f2fs_sb_info *);
965void write_checkpoint(struct f2fs_sb_info *, bool, bool); 967void write_checkpoint(struct f2fs_sb_info *, bool, bool);
966void init_orphan_info(struct f2fs_sb_info *); 968void init_orphan_info(struct f2fs_sb_info *);
967int create_checkpoint_caches(void); 969int __init create_checkpoint_caches(void);
968void destroy_checkpoint_caches(void); 970void destroy_checkpoint_caches(void);
969 971
970/* 972/*
@@ -984,9 +986,9 @@ int do_write_data_page(struct page *);
984int start_gc_thread(struct f2fs_sb_info *); 986int start_gc_thread(struct f2fs_sb_info *);
985void stop_gc_thread(struct f2fs_sb_info *); 987void stop_gc_thread(struct f2fs_sb_info *);
986block_t start_bidx_of_node(unsigned int); 988block_t start_bidx_of_node(unsigned int);
987int f2fs_gc(struct f2fs_sb_info *, int); 989int f2fs_gc(struct f2fs_sb_info *);
988void build_gc_manager(struct f2fs_sb_info *); 990void build_gc_manager(struct f2fs_sb_info *);
989int create_gc_caches(void); 991int __init create_gc_caches(void);
990void destroy_gc_caches(void); 992void destroy_gc_caches(void);
991 993
992/* 994/*
@@ -1058,7 +1060,8 @@ struct f2fs_stat_info {
1058 1060
1059int f2fs_build_stats(struct f2fs_sb_info *); 1061int f2fs_build_stats(struct f2fs_sb_info *);
1060void f2fs_destroy_stats(struct f2fs_sb_info *); 1062void f2fs_destroy_stats(struct f2fs_sb_info *);
1061void destroy_root_stats(void); 1063void __init f2fs_create_root_stats(void);
1064void f2fs_destroy_root_stats(void);
1062#else 1065#else
1063#define stat_inc_call_count(si) 1066#define stat_inc_call_count(si)
1064#define stat_inc_seg_count(si, type) 1067#define stat_inc_seg_count(si, type)
@@ -1068,7 +1071,8 @@ void destroy_root_stats(void);
1068 1071
1069static inline int f2fs_build_stats(struct f2fs_sb_info *sbi) { return 0; } 1072static inline int f2fs_build_stats(struct f2fs_sb_info *sbi) { return 0; }
1070static inline void f2fs_destroy_stats(struct f2fs_sb_info *sbi) { } 1073static inline void f2fs_destroy_stats(struct f2fs_sb_info *sbi) { }
1071static inline void destroy_root_stats(void) { } 1074static inline void __init f2fs_create_root_stats(void) { }
1075static inline void f2fs_destroy_root_stats(void) { }
1072#endif 1076#endif
1073 1077
1074extern const struct file_operations f2fs_dir_operations; 1078extern const struct file_operations f2fs_dir_operations;