f2fs.h (c829a33253e018472335b02e6d8bb1bb4213a142) | f2fs.h (8b8dd65f72ccbf7111eb97c4c4f5b5df2a412a07) |
---|---|
1/* 2 * fs/f2fs/f2fs.h 3 * 4 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 5 * http://www.samsung.com/ 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 36 unchanged lines hidden (view full) --- 45enum { 46 FAULT_KMALLOC, 47 FAULT_PAGE_ALLOC, 48 FAULT_ALLOC_NID, 49 FAULT_ORPHAN, 50 FAULT_BLOCK, 51 FAULT_DIR_DEPTH, 52 FAULT_EVICT_INODE, | 1/* 2 * fs/f2fs/f2fs.h 3 * 4 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 5 * http://www.samsung.com/ 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 36 unchanged lines hidden (view full) --- 45enum { 46 FAULT_KMALLOC, 47 FAULT_PAGE_ALLOC, 48 FAULT_ALLOC_NID, 49 FAULT_ORPHAN, 50 FAULT_BLOCK, 51 FAULT_DIR_DEPTH, 52 FAULT_EVICT_INODE, |
53 FAULT_TRUNCATE, |
|
53 FAULT_IO, 54 FAULT_CHECKPOINT, 55 FAULT_MAX, 56}; 57 58struct f2fs_fault_info { 59 atomic_t inject_ops; 60 unsigned int inject_rate; --- 131 unchanged lines hidden (view full) --- 192 D_PREP, 193 D_SUBMIT, 194 D_DONE, 195}; 196 197struct discard_cmd { 198 struct list_head list; /* command list */ 199 struct completion wait; /* compleation */ | 54 FAULT_IO, 55 FAULT_CHECKPOINT, 56 FAULT_MAX, 57}; 58 59struct f2fs_fault_info { 60 atomic_t inject_ops; 61 unsigned int inject_rate; --- 131 unchanged lines hidden (view full) --- 193 D_PREP, 194 D_SUBMIT, 195 D_DONE, 196}; 197 198struct discard_cmd { 199 struct list_head list; /* command list */ 200 struct completion wait; /* compleation */ |
201 struct block_device *bdev; /* bdev */ |
|
200 block_t lstart; /* logical start address */ | 202 block_t lstart; /* logical start address */ |
203 block_t start; /* actual start address in dev */ |
|
201 block_t len; /* length */ | 204 block_t len; /* length */ |
202 struct bio *bio; /* bio */ | |
203 int state; /* state */ | 205 int state; /* state */ |
206 int error; /* bio error */ |
|
204}; 205 206struct discard_cmd_control { 207 struct task_struct *f2fs_issue_discard; /* discard thread */ 208 struct list_head discard_entry_list; /* 4KB discard entry list */ 209 int nr_discards; /* # of discards in the list */ 210 struct list_head discard_cmd_list; /* discard cmd list */ 211 wait_queue_head_t discard_wait_queue; /* waiting queue for wake-up */ 212 struct mutex cmd_lock; 213 int max_discards; /* max. discards to be issued */ | 207}; 208 209struct discard_cmd_control { 210 struct task_struct *f2fs_issue_discard; /* discard thread */ 211 struct list_head discard_entry_list; /* 4KB discard entry list */ 212 int nr_discards; /* # of discards in the list */ 213 struct list_head discard_cmd_list; /* discard cmd list */ 214 wait_queue_head_t discard_wait_queue; /* waiting queue for wake-up */ 215 struct mutex cmd_lock; 216 int max_discards; /* max. discards to be issued */ |
214 atomic_t submit_discard; /* # of issued discard */ | 217 atomic_t issued_discard; /* # of issued discard */ 218 atomic_t issing_discard; /* # of issing discard */ |
215}; 216 217/* for the list of fsync inodes, used only during recovery */ 218struct fsync_inode_entry { 219 struct list_head list; /* list head */ 220 struct inode *inode; /* vfs inode pointer */ 221 block_t blkaddr; /* block address locating the last fsync */ 222 block_t last_dentry; /* block address locating the last dentry */ --- 334 unchanged lines hidden (view full) --- 557 struct radix_tree_root free_nid_root;/* root of the free_nid cache */ 558 struct list_head nid_list[MAX_NID_LIST];/* lists for free nids */ 559 unsigned int nid_cnt[MAX_NID_LIST]; /* the number of free node id */ 560 spinlock_t nid_list_lock; /* protect nid lists ops */ 561 struct mutex build_lock; /* lock for build free nids */ 562 unsigned char (*free_nid_bitmap)[NAT_ENTRY_BITMAP_SIZE]; 563 unsigned char *nat_block_bitmap; 564 unsigned short *free_nid_count; /* free nid count of NAT block */ | 219}; 220 221/* for the list of fsync inodes, used only during recovery */ 222struct fsync_inode_entry { 223 struct list_head list; /* list head */ 224 struct inode *inode; /* vfs inode pointer */ 225 block_t blkaddr; /* block address locating the last fsync */ 226 block_t last_dentry; /* block address locating the last dentry */ --- 334 unchanged lines hidden (view full) --- 561 struct radix_tree_root free_nid_root;/* root of the free_nid cache */ 562 struct list_head nid_list[MAX_NID_LIST];/* lists for free nids */ 563 unsigned int nid_cnt[MAX_NID_LIST]; /* the number of free node id */ 564 spinlock_t nid_list_lock; /* protect nid lists ops */ 565 struct mutex build_lock; /* lock for build free nids */ 566 unsigned char (*free_nid_bitmap)[NAT_ENTRY_BITMAP_SIZE]; 567 unsigned char *nat_block_bitmap; 568 unsigned short *free_nid_count; /* free nid count of NAT block */ |
565 spinlock_t free_nid_lock; /* protect updating of nid count */ | |
566 567 /* for checkpoint */ 568 char *nat_bitmap; /* NAT bitmap pointer */ 569 570 unsigned int nat_bits_blocks; /* # of nat bits blocks */ 571 unsigned char *nat_bits; /* NAT bits blocks */ 572 unsigned char *full_nat_bits; /* full NAT pages */ 573 unsigned char *empty_nat_bits; /* empty NAT pages */ --- 62 unchanged lines hidden (view full) --- 636 struct completion wait; 637 struct llist_node llnode; 638 int ret; 639}; 640 641struct flush_cmd_control { 642 struct task_struct *f2fs_issue_flush; /* flush thread */ 643 wait_queue_head_t flush_wait_queue; /* waiting queue for wake-up */ | 569 570 /* for checkpoint */ 571 char *nat_bitmap; /* NAT bitmap pointer */ 572 573 unsigned int nat_bits_blocks; /* # of nat bits blocks */ 574 unsigned char *nat_bits; /* NAT bits blocks */ 575 unsigned char *full_nat_bits; /* full NAT pages */ 576 unsigned char *empty_nat_bits; /* empty NAT pages */ --- 62 unchanged lines hidden (view full) --- 639 struct completion wait; 640 struct llist_node llnode; 641 int ret; 642}; 643 644struct flush_cmd_control { 645 struct task_struct *f2fs_issue_flush; /* flush thread */ 646 wait_queue_head_t flush_wait_queue; /* waiting queue for wake-up */ |
644 atomic_t submit_flush; /* # of issued flushes */ | 647 atomic_t issued_flush; /* # of issued flushes */ 648 atomic_t issing_flush; /* # of issing flushes */ |
645 struct llist_head issue_list; /* list for command issue */ 646 struct llist_node *dispatch_list; /* list for command dispatch */ 647}; 648 649struct f2fs_sm_info { 650 struct sit_info *sit_info; /* whole segment information */ 651 struct free_segmap_info *free_info; /* free segment information */ 652 struct dirty_seglist_info *dirty_info; /* dirty segment information */ --- 64 unchanged lines hidden (view full) --- 717enum page_type { 718 DATA, 719 NODE, 720 META, 721 NR_PAGE_TYPE, 722 META_FLUSH, 723 INMEM, /* the below types are used by tracepoints only. */ 724 INMEM_DROP, | 649 struct llist_head issue_list; /* list for command issue */ 650 struct llist_node *dispatch_list; /* list for command dispatch */ 651}; 652 653struct f2fs_sm_info { 654 struct sit_info *sit_info; /* whole segment information */ 655 struct free_segmap_info *free_info; /* free segment information */ 656 struct dirty_seglist_info *dirty_info; /* dirty segment information */ --- 64 unchanged lines hidden (view full) --- 721enum page_type { 722 DATA, 723 NODE, 724 META, 725 NR_PAGE_TYPE, 726 META_FLUSH, 727 INMEM, /* the below types are used by tracepoints only. */ 728 INMEM_DROP, |
729 INMEM_INVALIDATE, |
|
725 INMEM_REVOKE, 726 IPU, 727 OPU, 728}; 729 730struct f2fs_io_info { 731 struct f2fs_sb_info *sbi; /* f2fs_sb_info pointer */ 732 enum page_type type; /* contains DATA/NODE/META/META_FLUSH */ --- 89 unchanged lines hidden (view full) --- 822 /* for checkpoint */ 823 struct f2fs_checkpoint *ckpt; /* raw checkpoint pointer */ 824 int cur_cp_pack; /* remain current cp pack */ 825 spinlock_t cp_lock; /* for flag in ckpt */ 826 struct inode *meta_inode; /* cache meta blocks */ 827 struct mutex cp_mutex; /* checkpoint procedure lock */ 828 struct rw_semaphore cp_rwsem; /* blocking FS operations */ 829 struct rw_semaphore node_write; /* locking node writes */ | 730 INMEM_REVOKE, 731 IPU, 732 OPU, 733}; 734 735struct f2fs_io_info { 736 struct f2fs_sb_info *sbi; /* f2fs_sb_info pointer */ 737 enum page_type type; /* contains DATA/NODE/META/META_FLUSH */ --- 89 unchanged lines hidden (view full) --- 827 /* for checkpoint */ 828 struct f2fs_checkpoint *ckpt; /* raw checkpoint pointer */ 829 int cur_cp_pack; /* remain current cp pack */ 830 spinlock_t cp_lock; /* for flag in ckpt */ 831 struct inode *meta_inode; /* cache meta blocks */ 832 struct mutex cp_mutex; /* checkpoint procedure lock */ 833 struct rw_semaphore cp_rwsem; /* blocking FS operations */ 834 struct rw_semaphore node_write; /* locking node writes */ |
835 struct rw_semaphore node_change; /* locking node change */ |
|
830 wait_queue_head_t cp_wait; 831 unsigned long last_time[MAX_TIME]; /* to store time in jiffies */ 832 long interval_time[MAX_TIME]; /* to store thresholds */ 833 834 struct inode_management im[MAX_INO_ENTRY]; /* manage inode cache */ 835 836 /* for orphan inode, use 0'th array */ 837 unsigned int max_orphans; /* max orphan inodes */ --- 69 unchanged lines hidden (view full) --- 907 atomic64_t total_hit_ext; /* # of lookup extent cache */ 908 atomic64_t read_hit_rbtree; /* # of hit rbtree extent node */ 909 atomic64_t read_hit_largest; /* # of hit largest extent node */ 910 atomic64_t read_hit_cached; /* # of hit cached extent node */ 911 atomic_t inline_xattr; /* # of inline_xattr inodes */ 912 atomic_t inline_inode; /* # of inline_data inodes */ 913 atomic_t inline_dir; /* # of inline_dentry inodes */ 914 atomic_t aw_cnt; /* # of atomic writes */ | 836 wait_queue_head_t cp_wait; 837 unsigned long last_time[MAX_TIME]; /* to store time in jiffies */ 838 long interval_time[MAX_TIME]; /* to store thresholds */ 839 840 struct inode_management im[MAX_INO_ENTRY]; /* manage inode cache */ 841 842 /* for orphan inode, use 0'th array */ 843 unsigned int max_orphans; /* max orphan inodes */ --- 69 unchanged lines hidden (view full) --- 913 atomic64_t total_hit_ext; /* # of lookup extent cache */ 914 atomic64_t read_hit_rbtree; /* # of hit rbtree extent node */ 915 atomic64_t read_hit_largest; /* # of hit largest extent node */ 916 atomic64_t read_hit_cached; /* # of hit cached extent node */ 917 atomic_t inline_xattr; /* # of inline_xattr inodes */ 918 atomic_t inline_inode; /* # of inline_data inodes */ 919 atomic_t inline_dir; /* # of inline_dentry inodes */ 920 atomic_t aw_cnt; /* # of atomic writes */ |
921 atomic_t vw_cnt; /* # of volatile writes */ |
|
915 atomic_t max_aw_cnt; /* max # of atomic writes */ | 922 atomic_t max_aw_cnt; /* max # of atomic writes */ |
923 atomic_t max_vw_cnt; /* max # of volatile writes */ |
|
916 int bg_gc; /* background gc calls */ 917 unsigned int ndirty_inode[NR_INODE_TYPE]; /* # of dirty inodes */ 918#endif 919 unsigned int last_victim[2]; /* last victim segment # */ 920 spinlock_t stat_lock; /* lock for stat operations */ 921 922 /* For sysfs suppport */ 923 struct kobject s_kobj; --- 940 unchanged lines hidden (view full) --- 1864 return 0; 1865} 1866 1867static inline int f2fs_has_inline_data(struct inode *inode) 1868{ 1869 return is_inode_flag_set(inode, FI_INLINE_DATA); 1870} 1871 | 924 int bg_gc; /* background gc calls */ 925 unsigned int ndirty_inode[NR_INODE_TYPE]; /* # of dirty inodes */ 926#endif 927 unsigned int last_victim[2]; /* last victim segment # */ 928 spinlock_t stat_lock; /* lock for stat operations */ 929 930 /* For sysfs suppport */ 931 struct kobject s_kobj; --- 940 unchanged lines hidden (view full) --- 1872 return 0; 1873} 1874 1875static inline int f2fs_has_inline_data(struct inode *inode) 1876{ 1877 return is_inode_flag_set(inode, FI_INLINE_DATA); 1878} 1879 |
1872static inline void f2fs_clear_inline_inode(struct inode *inode) 1873{ 1874 clear_inode_flag(inode, FI_INLINE_DATA); 1875 clear_inode_flag(inode, FI_DATA_EXIST); 1876} 1877 | |
1878static inline int f2fs_exist_data(struct inode *inode) 1879{ 1880 return is_inode_flag_set(inode, FI_DATA_EXIST); 1881} 1882 1883static inline int f2fs_has_inline_dots(struct inode *inode) 1884{ 1885 return is_inode_flag_set(inode, FI_INLINE_DOTS); --- 138 unchanged lines hidden (view full) --- 2024 ret = __vmalloc(size, flags | __GFP_ZERO, PAGE_KERNEL); 2025 return ret; 2026} 2027 2028#define get_inode_mode(i) \ 2029 ((is_inode_flag_set(i, FI_ACL_MODE)) ? \ 2030 (F2FS_I(i)->i_acl_mode) : ((i)->i_mode)) 2031 | 1880static inline int f2fs_exist_data(struct inode *inode) 1881{ 1882 return is_inode_flag_set(inode, FI_DATA_EXIST); 1883} 1884 1885static inline int f2fs_has_inline_dots(struct inode *inode) 1886{ 1887 return is_inode_flag_set(inode, FI_INLINE_DOTS); --- 138 unchanged lines hidden (view full) --- 2026 ret = __vmalloc(size, flags | __GFP_ZERO, PAGE_KERNEL); 2027 return ret; 2028} 2029 2030#define get_inode_mode(i) \ 2031 ((is_inode_flag_set(i, FI_ACL_MODE)) ? \ 2032 (F2FS_I(i)->i_acl_mode) : ((i)->i_mode)) 2033 |
2032/* get offset of first page in next direct node */ 2033#define PGOFS_OF_NEXT_DNODE(pgofs, inode) \ 2034 ((pgofs < ADDRS_PER_INODE(inode)) ? ADDRS_PER_INODE(inode) : \ 2035 (pgofs - ADDRS_PER_INODE(inode) + ADDRS_PER_BLOCK) / \ 2036 ADDRS_PER_BLOCK * ADDRS_PER_BLOCK + ADDRS_PER_INODE(inode)) 2037 | |
2038/* 2039 * file.c 2040 */ 2041int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync); 2042void truncate_data_blocks(struct dnode_of_data *dn); 2043int truncate_blocks(struct inode *inode, u64 from, bool lock); 2044int f2fs_truncate(struct inode *inode); 2045int f2fs_getattr(const struct path *path, struct kstat *stat, --- 45 unchanged lines hidden (view full) --- 2091 struct fscrypt_name *fname, struct page **res_page); 2092struct f2fs_dir_entry *f2fs_find_entry(struct inode *dir, 2093 const struct qstr *child, struct page **res_page); 2094struct f2fs_dir_entry *f2fs_parent_dir(struct inode *dir, struct page **p); 2095ino_t f2fs_inode_by_name(struct inode *dir, const struct qstr *qstr, 2096 struct page **page); 2097void f2fs_set_link(struct inode *dir, struct f2fs_dir_entry *de, 2098 struct page *page, struct inode *inode); | 2034/* 2035 * file.c 2036 */ 2037int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync); 2038void truncate_data_blocks(struct dnode_of_data *dn); 2039int truncate_blocks(struct inode *inode, u64 from, bool lock); 2040int f2fs_truncate(struct inode *inode); 2041int f2fs_getattr(const struct path *path, struct kstat *stat, --- 45 unchanged lines hidden (view full) --- 2087 struct fscrypt_name *fname, struct page **res_page); 2088struct f2fs_dir_entry *f2fs_find_entry(struct inode *dir, 2089 const struct qstr *child, struct page **res_page); 2090struct f2fs_dir_entry *f2fs_parent_dir(struct inode *dir, struct page **p); 2091ino_t f2fs_inode_by_name(struct inode *dir, const struct qstr *qstr, 2092 struct page **page); 2093void f2fs_set_link(struct inode *dir, struct f2fs_dir_entry *de, 2094 struct page *page, struct inode *inode); |
2099int update_dent_inode(struct inode *inode, struct inode *to, 2100 const struct qstr *name); | |
2101void f2fs_update_dentry(nid_t ino, umode_t mode, struct f2fs_dentry_ptr *d, 2102 const struct qstr *name, f2fs_hash_t name_hash, 2103 unsigned int bit_pos); 2104int f2fs_add_regular_entry(struct inode *dir, const struct qstr *new_name, 2105 const struct qstr *orig_name, 2106 struct inode *inode, nid_t ino, umode_t mode); 2107int __f2fs_do_add_link(struct inode *dir, struct fscrypt_name *fname, 2108 struct inode *inode, nid_t ino, umode_t mode); --- 70 unchanged lines hidden (view full) --- 2179int __init create_node_manager_caches(void); 2180void destroy_node_manager_caches(void); 2181 2182/* 2183 * segment.c 2184 */ 2185void register_inmem_page(struct inode *inode, struct page *page); 2186void drop_inmem_pages(struct inode *inode); | 2095void f2fs_update_dentry(nid_t ino, umode_t mode, struct f2fs_dentry_ptr *d, 2096 const struct qstr *name, f2fs_hash_t name_hash, 2097 unsigned int bit_pos); 2098int f2fs_add_regular_entry(struct inode *dir, const struct qstr *new_name, 2099 const struct qstr *orig_name, 2100 struct inode *inode, nid_t ino, umode_t mode); 2101int __f2fs_do_add_link(struct inode *dir, struct fscrypt_name *fname, 2102 struct inode *inode, nid_t ino, umode_t mode); --- 70 unchanged lines hidden (view full) --- 2173int __init create_node_manager_caches(void); 2174void destroy_node_manager_caches(void); 2175 2176/* 2177 * segment.c 2178 */ 2179void register_inmem_page(struct inode *inode, struct page *page); 2180void drop_inmem_pages(struct inode *inode); |
2181void drop_inmem_page(struct inode *inode, struct page *page); |
|
2187int commit_inmem_pages(struct inode *inode); 2188void f2fs_balance_fs(struct f2fs_sb_info *sbi, bool need); 2189void f2fs_balance_fs_bg(struct f2fs_sb_info *sbi); 2190int f2fs_issue_flush(struct f2fs_sb_info *sbi); 2191int create_flush_cmd_control(struct f2fs_sb_info *sbi); 2192void destroy_flush_cmd_control(struct f2fs_sb_info *sbi, bool free); 2193void invalidate_blocks(struct f2fs_sb_info *sbi, block_t addr); 2194bool is_checkpointed_data(struct f2fs_sb_info *sbi, block_t blkaddr); --- 136 unchanged lines hidden (view full) --- 2331 unsigned long long hit_largest, hit_cached, hit_rbtree; 2332 unsigned long long hit_total, total_ext; 2333 int ext_tree, zombie_tree, ext_node; 2334 int ndirty_node, ndirty_dent, ndirty_meta, ndirty_data, ndirty_imeta; 2335 int inmem_pages; 2336 unsigned int ndirty_dirs, ndirty_files, ndirty_all; 2337 int nats, dirty_nats, sits, dirty_sits, free_nids, alloc_nids; 2338 int total_count, utilization; | 2182int commit_inmem_pages(struct inode *inode); 2183void f2fs_balance_fs(struct f2fs_sb_info *sbi, bool need); 2184void f2fs_balance_fs_bg(struct f2fs_sb_info *sbi); 2185int f2fs_issue_flush(struct f2fs_sb_info *sbi); 2186int create_flush_cmd_control(struct f2fs_sb_info *sbi); 2187void destroy_flush_cmd_control(struct f2fs_sb_info *sbi, bool free); 2188void invalidate_blocks(struct f2fs_sb_info *sbi, block_t addr); 2189bool is_checkpointed_data(struct f2fs_sb_info *sbi, block_t blkaddr); --- 136 unchanged lines hidden (view full) --- 2326 unsigned long long hit_largest, hit_cached, hit_rbtree; 2327 unsigned long long hit_total, total_ext; 2328 int ext_tree, zombie_tree, ext_node; 2329 int ndirty_node, ndirty_dent, ndirty_meta, ndirty_data, ndirty_imeta; 2330 int inmem_pages; 2331 unsigned int ndirty_dirs, ndirty_files, ndirty_all; 2332 int nats, dirty_nats, sits, dirty_sits, free_nids, alloc_nids; 2333 int total_count, utilization; |
2339 int bg_gc, nr_wb_cp_data, nr_wb_data, nr_flush, nr_discard; | 2334 int bg_gc, nr_wb_cp_data, nr_wb_data; 2335 int nr_flushing, nr_flushed, nr_discarding, nr_discarded; |
2340 int inline_xattr, inline_inode, inline_dir, append, update, orphans; | 2336 int inline_xattr, inline_inode, inline_dir, append, update, orphans; |
2341 int aw_cnt, max_aw_cnt; | 2337 int aw_cnt, max_aw_cnt, vw_cnt, max_vw_cnt; |
2342 unsigned int valid_count, valid_node_count, valid_inode_count, discard_blks; 2343 unsigned int bimodal, avg_vblocks; 2344 int util_free, util_valid, util_invalid; 2345 int rsvd_segs, overp_segs; 2346 int dirty_count, node_pages, meta_pages; 2347 int prefree_count, call_count, cp_count, bg_cp_count; 2348 int tot_segs, node_segs, data_segs, free_segs, free_secs; 2349 int bg_node_segs, bg_data_segs; --- 66 unchanged lines hidden (view full) --- 2416 (atomic_dec(&F2FS_I_SB(inode)->aw_cnt)) 2417#define stat_update_max_atomic_write(inode) \ 2418 do { \ 2419 int cur = atomic_read(&F2FS_I_SB(inode)->aw_cnt); \ 2420 int max = atomic_read(&F2FS_I_SB(inode)->max_aw_cnt); \ 2421 if (cur > max) \ 2422 atomic_set(&F2FS_I_SB(inode)->max_aw_cnt, cur); \ 2423 } while (0) | 2338 unsigned int valid_count, valid_node_count, valid_inode_count, discard_blks; 2339 unsigned int bimodal, avg_vblocks; 2340 int util_free, util_valid, util_invalid; 2341 int rsvd_segs, overp_segs; 2342 int dirty_count, node_pages, meta_pages; 2343 int prefree_count, call_count, cp_count, bg_cp_count; 2344 int tot_segs, node_segs, data_segs, free_segs, free_secs; 2345 int bg_node_segs, bg_data_segs; --- 66 unchanged lines hidden (view full) --- 2412 (atomic_dec(&F2FS_I_SB(inode)->aw_cnt)) 2413#define stat_update_max_atomic_write(inode) \ 2414 do { \ 2415 int cur = atomic_read(&F2FS_I_SB(inode)->aw_cnt); \ 2416 int max = atomic_read(&F2FS_I_SB(inode)->max_aw_cnt); \ 2417 if (cur > max) \ 2418 atomic_set(&F2FS_I_SB(inode)->max_aw_cnt, cur); \ 2419 } while (0) |
2420#define stat_inc_volatile_write(inode) \ 2421 (atomic_inc(&F2FS_I_SB(inode)->vw_cnt)) 2422#define stat_dec_volatile_write(inode) \ 2423 (atomic_dec(&F2FS_I_SB(inode)->vw_cnt)) 2424#define stat_update_max_volatile_write(inode) \ 2425 do { \ 2426 int cur = atomic_read(&F2FS_I_SB(inode)->vw_cnt); \ 2427 int max = atomic_read(&F2FS_I_SB(inode)->max_vw_cnt); \ 2428 if (cur > max) \ 2429 atomic_set(&F2FS_I_SB(inode)->max_vw_cnt, cur); \ 2430 } while (0) |
|
2424#define stat_inc_seg_count(sbi, type, gc_type) \ 2425 do { \ 2426 struct f2fs_stat_info *si = F2FS_STAT(sbi); \ 2427 (si)->tot_segs++; \ 2428 if (type == SUM_TYPE_DATA) { \ 2429 si->data_segs++; \ 2430 si->bg_data_segs += (gc_type == BG_GC) ? 1 : 0; \ 2431 } else { \ --- 40 unchanged lines hidden (view full) --- 2472#define stat_dec_inline_xattr(inode) 2473#define stat_inc_inline_inode(inode) 2474#define stat_dec_inline_inode(inode) 2475#define stat_inc_inline_dir(inode) 2476#define stat_dec_inline_dir(inode) 2477#define stat_inc_atomic_write(inode) 2478#define stat_dec_atomic_write(inode) 2479#define stat_update_max_atomic_write(inode) | 2431#define stat_inc_seg_count(sbi, type, gc_type) \ 2432 do { \ 2433 struct f2fs_stat_info *si = F2FS_STAT(sbi); \ 2434 (si)->tot_segs++; \ 2435 if (type == SUM_TYPE_DATA) { \ 2436 si->data_segs++; \ 2437 si->bg_data_segs += (gc_type == BG_GC) ? 1 : 0; \ 2438 } else { \ --- 40 unchanged lines hidden (view full) --- 2479#define stat_dec_inline_xattr(inode) 2480#define stat_inc_inline_inode(inode) 2481#define stat_dec_inline_inode(inode) 2482#define stat_inc_inline_dir(inode) 2483#define stat_dec_inline_dir(inode) 2484#define stat_inc_atomic_write(inode) 2485#define stat_dec_atomic_write(inode) 2486#define stat_update_max_atomic_write(inode) |
2487#define stat_inc_volatile_write(inode) 2488#define stat_dec_volatile_write(inode) 2489#define stat_update_max_volatile_write(inode) |
|
2480#define stat_inc_seg_type(sbi, curseg) 2481#define stat_inc_block_count(sbi, curseg) 2482#define stat_inc_inplace_blocks(sbi) 2483#define stat_inc_seg_count(sbi, type, gc_type) 2484#define stat_inc_tot_blk_count(si, blks) 2485#define stat_inc_data_blk_count(sbi, blks, gc_type) 2486#define stat_inc_node_blk_count(sbi, blks, gc_type) 2487 --- 16 unchanged lines hidden (view full) --- 2504extern struct kmem_cache *inode_entry_slab; 2505 2506/* 2507 * inline.c 2508 */ 2509bool f2fs_may_inline_data(struct inode *inode); 2510bool f2fs_may_inline_dentry(struct inode *inode); 2511void read_inline_data(struct page *page, struct page *ipage); | 2490#define stat_inc_seg_type(sbi, curseg) 2491#define stat_inc_block_count(sbi, curseg) 2492#define stat_inc_inplace_blocks(sbi) 2493#define stat_inc_seg_count(sbi, type, gc_type) 2494#define stat_inc_tot_blk_count(si, blks) 2495#define stat_inc_data_blk_count(sbi, blks, gc_type) 2496#define stat_inc_node_blk_count(sbi, blks, gc_type) 2497 --- 16 unchanged lines hidden (view full) --- 2514extern struct kmem_cache *inode_entry_slab; 2515 2516/* 2517 * inline.c 2518 */ 2519bool f2fs_may_inline_data(struct inode *inode); 2520bool f2fs_may_inline_dentry(struct inode *inode); 2521void read_inline_data(struct page *page, struct page *ipage); |
2512bool truncate_inline_inode(struct page *ipage, u64 from); | 2522void truncate_inline_inode(struct inode *inode, struct page *ipage, u64 from); |
2513int f2fs_read_inline_data(struct inode *inode, struct page *page); 2514int f2fs_convert_inline_page(struct dnode_of_data *dn, struct page *page); 2515int f2fs_convert_inline_inode(struct inode *inode); 2516int f2fs_write_inline_data(struct inode *inode, struct page *page); 2517bool recover_inline_data(struct inode *inode, struct page *npage); 2518struct f2fs_dir_entry *find_in_inline_dir(struct inode *dir, 2519 struct fscrypt_name *fname, struct page **res_page); 2520int make_empty_inline_dir(struct inode *inode, struct inode *parent, --- 118 unchanged lines hidden --- | 2523int f2fs_read_inline_data(struct inode *inode, struct page *page); 2524int f2fs_convert_inline_page(struct dnode_of_data *dn, struct page *page); 2525int f2fs_convert_inline_inode(struct inode *inode); 2526int f2fs_write_inline_data(struct inode *inode, struct page *page); 2527bool recover_inline_data(struct inode *inode, struct page *npage); 2528struct f2fs_dir_entry *find_in_inline_dir(struct inode *dir, 2529 struct fscrypt_name *fname, struct page **res_page); 2530int make_empty_inline_dir(struct inode *inode, struct inode *parent, --- 118 unchanged lines hidden --- |