f2fs.h (1d1df41c5a33359a00e919d54eaebfb789711fdc) | f2fs.h (5298d4bfe80f6ae6ae2777bcd1357b0022d98573) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2/* 3 * fs/f2fs/f2fs.h 4 * 5 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 6 * http://www.samsung.com/ 7 */ 8#ifndef _LINUX_F2FS_H --- 44 unchanged lines hidden (view full) --- 53 FAULT_EVICT_INODE, 54 FAULT_TRUNCATE, 55 FAULT_READ_IO, 56 FAULT_CHECKPOINT, 57 FAULT_DISCARD, 58 FAULT_WRITE_IO, 59 FAULT_SLAB_ALLOC, 60 FAULT_DQUOT_INIT, | 1/* SPDX-License-Identifier: GPL-2.0 */ 2/* 3 * fs/f2fs/f2fs.h 4 * 5 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 6 * http://www.samsung.com/ 7 */ 8#ifndef _LINUX_F2FS_H --- 44 unchanged lines hidden (view full) --- 53 FAULT_EVICT_INODE, 54 FAULT_TRUNCATE, 55 FAULT_READ_IO, 56 FAULT_CHECKPOINT, 57 FAULT_DISCARD, 58 FAULT_WRITE_IO, 59 FAULT_SLAB_ALLOC, 60 FAULT_DQUOT_INIT, |
61 FAULT_LOCK_OP, | |
62 FAULT_MAX, 63}; 64 65#ifdef CONFIG_F2FS_FAULT_INJECTION 66#define F2FS_ALL_FAULT_TYPE ((1 << FAULT_MAX) - 1) 67 68struct f2fs_fault_info { 69 atomic_t inject_ops; --- 413 unchanged lines hidden (view full) --- 483 484#ifdef CONFIG_FS_ENCRYPTION 485 /* 486 * For lookups in encrypted directories: either the buffer backing 487 * disk_name, or a buffer that holds the decoded no-key name. 488 */ 489 struct fscrypt_str crypto_buf; 490#endif | 61 FAULT_MAX, 62}; 63 64#ifdef CONFIG_F2FS_FAULT_INJECTION 65#define F2FS_ALL_FAULT_TYPE ((1 << FAULT_MAX) - 1) 66 67struct f2fs_fault_info { 68 atomic_t inject_ops; --- 413 unchanged lines hidden (view full) --- 482 483#ifdef CONFIG_FS_ENCRYPTION 484 /* 485 * For lookups in encrypted directories: either the buffer backing 486 * disk_name, or a buffer that holds the decoded no-key name. 487 */ 488 struct fscrypt_str crypto_buf; 489#endif |
491#ifdef CONFIG_UNICODE | 490#if IS_ENABLED(CONFIG_UNICODE) |
492 /* 493 * For casefolded directories: the casefolded name, but it's left NULL 494 * if the original name is not valid Unicode, if the directory is both 495 * casefolded and encrypted and its encryption key is unavailable, or if 496 * the filesystem is doing an internal operation where usr_fname is also 497 * NULL. In all these cases we fall back to treating the name as an 498 * opaque byte sequence. 499 */ --- 152 unchanged lines hidden (view full) --- 652 */ 653#define FADVISE_COLD_BIT 0x01 654#define FADVISE_LOST_PINO_BIT 0x02 655#define FADVISE_ENCRYPT_BIT 0x04 656#define FADVISE_ENC_NAME_BIT 0x08 657#define FADVISE_KEEP_SIZE_BIT 0x10 658#define FADVISE_HOT_BIT 0x20 659#define FADVISE_VERITY_BIT 0x40 | 491 /* 492 * For casefolded directories: the casefolded name, but it's left NULL 493 * if the original name is not valid Unicode, if the directory is both 494 * casefolded and encrypted and its encryption key is unavailable, or if 495 * the filesystem is doing an internal operation where usr_fname is also 496 * NULL. In all these cases we fall back to treating the name as an 497 * opaque byte sequence. 498 */ --- 152 unchanged lines hidden (view full) --- 651 */ 652#define FADVISE_COLD_BIT 0x01 653#define FADVISE_LOST_PINO_BIT 0x02 654#define FADVISE_ENCRYPT_BIT 0x04 655#define FADVISE_ENC_NAME_BIT 0x08 656#define FADVISE_KEEP_SIZE_BIT 0x10 657#define FADVISE_HOT_BIT 0x20 658#define FADVISE_VERITY_BIT 0x40 |
660#define FADVISE_TRUNC_BIT 0x80 | |
661 662#define FADVISE_MODIFIABLE_BITS (FADVISE_COLD_BIT | FADVISE_HOT_BIT) 663 664#define file_is_cold(inode) is_file(inode, FADVISE_COLD_BIT) 665#define file_set_cold(inode) set_file(inode, FADVISE_COLD_BIT) 666#define file_clear_cold(inode) clear_file(inode, FADVISE_COLD_BIT) 667 668#define file_wrong_pino(inode) is_file(inode, FADVISE_LOST_PINO_BIT) --- 11 unchanged lines hidden (view full) --- 680 681#define file_is_hot(inode) is_file(inode, FADVISE_HOT_BIT) 682#define file_set_hot(inode) set_file(inode, FADVISE_HOT_BIT) 683#define file_clear_hot(inode) clear_file(inode, FADVISE_HOT_BIT) 684 685#define file_is_verity(inode) is_file(inode, FADVISE_VERITY_BIT) 686#define file_set_verity(inode) set_file(inode, FADVISE_VERITY_BIT) 687 | 659 660#define FADVISE_MODIFIABLE_BITS (FADVISE_COLD_BIT | FADVISE_HOT_BIT) 661 662#define file_is_cold(inode) is_file(inode, FADVISE_COLD_BIT) 663#define file_set_cold(inode) set_file(inode, FADVISE_COLD_BIT) 664#define file_clear_cold(inode) clear_file(inode, FADVISE_COLD_BIT) 665 666#define file_wrong_pino(inode) is_file(inode, FADVISE_LOST_PINO_BIT) --- 11 unchanged lines hidden (view full) --- 678 679#define file_is_hot(inode) is_file(inode, FADVISE_HOT_BIT) 680#define file_set_hot(inode) set_file(inode, FADVISE_HOT_BIT) 681#define file_clear_hot(inode) clear_file(inode, FADVISE_HOT_BIT) 682 683#define file_is_verity(inode) is_file(inode, FADVISE_VERITY_BIT) 684#define file_set_verity(inode) set_file(inode, FADVISE_VERITY_BIT) 685 |
688#define file_should_truncate(inode) is_file(inode, FADVISE_TRUNC_BIT) 689#define file_need_truncate(inode) set_file(inode, FADVISE_TRUNC_BIT) 690#define file_dont_truncate(inode) clear_file(inode, FADVISE_TRUNC_BIT) 691 | |
692#define DEF_DIR_LEVEL 0 693 694enum { 695 GC_FAILURE_PIN, 696 GC_FAILURE_ATOMIC, 697 MAX_GC_FAILURE 698}; 699 --- 18 unchanged lines hidden (view full) --- 718 FI_ATOMIC_COMMIT, /* indicate the state of atomical committing */ 719 FI_VOLATILE_FILE, /* indicate volatile file */ 720 FI_FIRST_BLOCK_WRITTEN, /* indicate #0 data block was written */ 721 FI_DROP_CACHE, /* drop dirty page cache */ 722 FI_DATA_EXIST, /* indicate data exists */ 723 FI_INLINE_DOTS, /* indicate inline dot dentries */ 724 FI_DO_DEFRAG, /* indicate defragment is running */ 725 FI_DIRTY_FILE, /* indicate regular/symlink has dirty pages */ | 686#define DEF_DIR_LEVEL 0 687 688enum { 689 GC_FAILURE_PIN, 690 GC_FAILURE_ATOMIC, 691 MAX_GC_FAILURE 692}; 693 --- 18 unchanged lines hidden (view full) --- 712 FI_ATOMIC_COMMIT, /* indicate the state of atomical committing */ 713 FI_VOLATILE_FILE, /* indicate volatile file */ 714 FI_FIRST_BLOCK_WRITTEN, /* indicate #0 data block was written */ 715 FI_DROP_CACHE, /* drop dirty page cache */ 716 FI_DATA_EXIST, /* indicate data exists */ 717 FI_INLINE_DOTS, /* indicate inline dot dentries */ 718 FI_DO_DEFRAG, /* indicate defragment is running */ 719 FI_DIRTY_FILE, /* indicate regular/symlink has dirty pages */ |
726 FI_PREALLOCATED_ALL, /* all blocks for write were preallocated */ | 720 FI_NO_PREALLOC, /* indicate skipped preallocated blocks */ |
727 FI_HOT_DATA, /* indicate file is hot */ 728 FI_EXTRA_ATTR, /* indicate file has extra attribute */ 729 FI_PROJ_INHERIT, /* indicate file inherits projectid */ 730 FI_PIN_FILE, /* indicate file should not be gced */ 731 FI_ATOMIC_REVOKE_REQUEST, /* request to drop atomic data */ 732 FI_VERITY_IN_PROGRESS, /* building fs-verity Merkle tree */ 733 FI_COMPRESSED_FILE, /* indicate file's data can be compressed */ 734 FI_COMPRESS_CORRUPT, /* indicate compressed cluster is corrupted */ --- 286 unchanged lines hidden (view full) --- 1021 1022 block_t seg0_blkaddr; /* block address of 0'th segment */ 1023 block_t main_blkaddr; /* start block address of main area */ 1024 block_t ssa_blkaddr; /* start block address of SSA area */ 1025 1026 unsigned int segment_count; /* total # of segments */ 1027 unsigned int main_segments; /* # of segments in main area */ 1028 unsigned int reserved_segments; /* # of reserved segments */ | 721 FI_HOT_DATA, /* indicate file is hot */ 722 FI_EXTRA_ATTR, /* indicate file has extra attribute */ 723 FI_PROJ_INHERIT, /* indicate file inherits projectid */ 724 FI_PIN_FILE, /* indicate file should not be gced */ 725 FI_ATOMIC_REVOKE_REQUEST, /* request to drop atomic data */ 726 FI_VERITY_IN_PROGRESS, /* building fs-verity Merkle tree */ 727 FI_COMPRESSED_FILE, /* indicate file's data can be compressed */ 728 FI_COMPRESS_CORRUPT, /* indicate compressed cluster is corrupted */ --- 286 unchanged lines hidden (view full) --- 1015 1016 block_t seg0_blkaddr; /* block address of 0'th segment */ 1017 block_t main_blkaddr; /* start block address of main area */ 1018 block_t ssa_blkaddr; /* start block address of SSA area */ 1019 1020 unsigned int segment_count; /* total # of segments */ 1021 unsigned int main_segments; /* # of segments in main area */ 1022 unsigned int reserved_segments; /* # of reserved segments */ |
1029 unsigned int additional_reserved_segments;/* reserved segs for IO align feature */ | |
1030 unsigned int ovp_segments; /* # of overprovision segments */ 1031 1032 /* a threshold to reclaim prefree segments */ 1033 unsigned int rec_prefree_segments; 1034 1035 /* for batched trimming */ 1036 unsigned int trim_sections; /* # of sections to trim */ 1037 --- 452 unchanged lines hidden (view full) --- 1490 struct inode *inode; /* inode the context belong to */ 1491 pgoff_t cluster_idx; /* cluster index number */ 1492 unsigned int cluster_size; /* page count in cluster */ 1493 unsigned int log_cluster_size; /* log of cluster size */ 1494 struct page **rpages; /* pages store raw data in cluster */ 1495 unsigned int nr_rpages; /* total page number in rpages */ 1496 struct page **cpages; /* pages store compressed data in cluster */ 1497 unsigned int nr_cpages; /* total page number in cpages */ | 1023 unsigned int ovp_segments; /* # of overprovision segments */ 1024 1025 /* a threshold to reclaim prefree segments */ 1026 unsigned int rec_prefree_segments; 1027 1028 /* for batched trimming */ 1029 unsigned int trim_sections; /* # of sections to trim */ 1030 --- 452 unchanged lines hidden (view full) --- 1483 struct inode *inode; /* inode the context belong to */ 1484 pgoff_t cluster_idx; /* cluster index number */ 1485 unsigned int cluster_size; /* page count in cluster */ 1486 unsigned int log_cluster_size; /* log of cluster size */ 1487 struct page **rpages; /* pages store raw data in cluster */ 1488 unsigned int nr_rpages; /* total page number in rpages */ 1489 struct page **cpages; /* pages store compressed data in cluster */ 1490 unsigned int nr_cpages; /* total page number in cpages */ |
1498 unsigned int valid_nr_cpages; /* valid page number in cpages */ | |
1499 void *rbuf; /* virtual mapped address on rpages */ 1500 struct compress_data *cbuf; /* virtual mapped address on cpages */ 1501 size_t rlen; /* valid data length in rbuf */ 1502 size_t clen; /* valid data length in cbuf */ 1503 void *private; /* payload buffer for specified compression algorithm */ 1504 void *private2; /* extra payload buffer */ 1505}; 1506 --- 175 unchanged lines hidden (view full) --- 1682 * semaphore for GC, avoid 1683 * race between GC and GC or CP 1684 */ 1685 struct f2fs_gc_kthread *gc_thread; /* GC thread */ 1686 struct atgc_management am; /* atgc management */ 1687 unsigned int cur_victim_sec; /* current victim section num */ 1688 unsigned int gc_mode; /* current GC state */ 1689 unsigned int next_victim_seg[2]; /* next segment in victim section */ | 1491 void *rbuf; /* virtual mapped address on rpages */ 1492 struct compress_data *cbuf; /* virtual mapped address on cpages */ 1493 size_t rlen; /* valid data length in rbuf */ 1494 size_t clen; /* valid data length in cbuf */ 1495 void *private; /* payload buffer for specified compression algorithm */ 1496 void *private2; /* extra payload buffer */ 1497}; 1498 --- 175 unchanged lines hidden (view full) --- 1674 * semaphore for GC, avoid 1675 * race between GC and GC or CP 1676 */ 1677 struct f2fs_gc_kthread *gc_thread; /* GC thread */ 1678 struct atgc_management am; /* atgc management */ 1679 unsigned int cur_victim_sec; /* current victim section num */ 1680 unsigned int gc_mode; /* current GC state */ 1681 unsigned int next_victim_seg[2]; /* next segment in victim section */ |
1690 spinlock_t gc_urgent_high_lock; 1691 bool gc_urgent_high_limited; /* indicates having limited trial count */ 1692 unsigned int gc_urgent_high_remaining; /* remaining trial count for GC_URGENT_HIGH */ | |
1693 1694 /* for skip statistic */ 1695 unsigned int atomic_files; /* # of opened atomic file */ 1696 unsigned long long skipped_atomic_files[2]; /* FG_GC and BG_GC */ 1697 unsigned long long skipped_gc_rwsem; /* FG_GC only */ 1698 1699 /* threshold for gc trials on pinned files */ 1700 u64 gc_pin_file_threshold; --- 108 unchanged lines hidden (view full) --- 1809 unsigned int iostat_period_ms; 1810 1811 /* For io latency related statistics info in one iostat period */ 1812 spinlock_t iostat_lat_lock; 1813 struct iostat_lat_info *iostat_io_lat; 1814#endif 1815}; 1816 | 1682 1683 /* for skip statistic */ 1684 unsigned int atomic_files; /* # of opened atomic file */ 1685 unsigned long long skipped_atomic_files[2]; /* FG_GC and BG_GC */ 1686 unsigned long long skipped_gc_rwsem; /* FG_GC only */ 1687 1688 /* threshold for gc trials on pinned files */ 1689 u64 gc_pin_file_threshold; --- 108 unchanged lines hidden (view full) --- 1798 unsigned int iostat_period_ms; 1799 1800 /* For io latency related statistics info in one iostat period */ 1801 spinlock_t iostat_lat_lock; 1802 struct iostat_lat_info *iostat_io_lat; 1803#endif 1804}; 1805 |
1806struct f2fs_private_dio { 1807 struct inode *inode; 1808 void *orig_private; 1809 bio_end_io_t *orig_end_io; 1810 bool write; 1811}; 1812 |
|
1817#ifdef CONFIG_F2FS_FAULT_INJECTION 1818#define f2fs_show_injection_info(sbi, type) \ 1819 printk_ratelimited("%sF2FS-fs (%s) : inject %s in %s of %pS\n", \ 1820 KERN_INFO, sbi->sb->s_id, \ 1821 f2fs_fault_name[type], \ 1822 __func__, __builtin_return_address(0)) 1823static inline bool time_to_inject(struct f2fs_sb_info *sbi, int type) 1824{ --- 269 unchanged lines hidden (view full) --- 2094 2095static inline void f2fs_lock_op(struct f2fs_sb_info *sbi) 2096{ 2097 down_read(&sbi->cp_rwsem); 2098} 2099 2100static inline int f2fs_trylock_op(struct f2fs_sb_info *sbi) 2101{ | 1813#ifdef CONFIG_F2FS_FAULT_INJECTION 1814#define f2fs_show_injection_info(sbi, type) \ 1815 printk_ratelimited("%sF2FS-fs (%s) : inject %s in %s of %pS\n", \ 1816 KERN_INFO, sbi->sb->s_id, \ 1817 f2fs_fault_name[type], \ 1818 __func__, __builtin_return_address(0)) 1819static inline bool time_to_inject(struct f2fs_sb_info *sbi, int type) 1820{ --- 269 unchanged lines hidden (view full) --- 2090 2091static inline void f2fs_lock_op(struct f2fs_sb_info *sbi) 2092{ 2093 down_read(&sbi->cp_rwsem); 2094} 2095 2096static inline int f2fs_trylock_op(struct f2fs_sb_info *sbi) 2097{ |
2102 if (time_to_inject(sbi, FAULT_LOCK_OP)) { 2103 f2fs_show_injection_info(sbi, FAULT_LOCK_OP); 2104 return 0; 2105 } | |
2106 return down_read_trylock(&sbi->cp_rwsem); 2107} 2108 2109static inline void f2fs_unlock_op(struct f2fs_sb_info *sbi) 2110{ 2111 up_read(&sbi->cp_rwsem); 2112} 2113 --- 89 unchanged lines hidden (view full) --- 2203 2204 spin_lock(&sbi->stat_lock); 2205 sbi->total_valid_block_count += (block_t)(*count); 2206 avail_user_block_count = sbi->user_block_count - 2207 sbi->current_reserved_blocks; 2208 2209 if (!__allow_reserved_blocks(sbi, inode, true)) 2210 avail_user_block_count -= F2FS_OPTION(sbi).root_reserved_blocks; | 2098 return down_read_trylock(&sbi->cp_rwsem); 2099} 2100 2101static inline void f2fs_unlock_op(struct f2fs_sb_info *sbi) 2102{ 2103 up_read(&sbi->cp_rwsem); 2104} 2105 --- 89 unchanged lines hidden (view full) --- 2195 2196 spin_lock(&sbi->stat_lock); 2197 sbi->total_valid_block_count += (block_t)(*count); 2198 avail_user_block_count = sbi->user_block_count - 2199 sbi->current_reserved_blocks; 2200 2201 if (!__allow_reserved_blocks(sbi, inode, true)) 2202 avail_user_block_count -= F2FS_OPTION(sbi).root_reserved_blocks; |
2211 2212 if (F2FS_IO_ALIGNED(sbi)) 2213 avail_user_block_count -= sbi->blocks_per_seg * 2214 SM_I(sbi)->additional_reserved_segments; 2215 | |
2216 if (unlikely(is_sbi_flag_set(sbi, SBI_CP_DISABLED))) { 2217 if (avail_user_block_count > sbi->unusable_block_count) 2218 avail_user_block_count -= sbi->unusable_block_count; 2219 else 2220 avail_user_block_count = 0; 2221 } 2222 if (unlikely(sbi->total_valid_block_count > avail_user_block_count)) { 2223 diff = sbi->total_valid_block_count - avail_user_block_count; --- 230 unchanged lines hidden (view full) --- 2454 2455 spin_lock(&sbi->stat_lock); 2456 2457 valid_block_count = sbi->total_valid_block_count + 2458 sbi->current_reserved_blocks + 1; 2459 2460 if (!__allow_reserved_blocks(sbi, inode, false)) 2461 valid_block_count += F2FS_OPTION(sbi).root_reserved_blocks; | 2203 if (unlikely(is_sbi_flag_set(sbi, SBI_CP_DISABLED))) { 2204 if (avail_user_block_count > sbi->unusable_block_count) 2205 avail_user_block_count -= sbi->unusable_block_count; 2206 else 2207 avail_user_block_count = 0; 2208 } 2209 if (unlikely(sbi->total_valid_block_count > avail_user_block_count)) { 2210 diff = sbi->total_valid_block_count - avail_user_block_count; --- 230 unchanged lines hidden (view full) --- 2441 2442 spin_lock(&sbi->stat_lock); 2443 2444 valid_block_count = sbi->total_valid_block_count + 2445 sbi->current_reserved_blocks + 1; 2446 2447 if (!__allow_reserved_blocks(sbi, inode, false)) 2448 valid_block_count += F2FS_OPTION(sbi).root_reserved_blocks; |
2462 2463 if (F2FS_IO_ALIGNED(sbi)) 2464 valid_block_count += sbi->blocks_per_seg * 2465 SM_I(sbi)->additional_reserved_segments; 2466 | |
2467 user_block_count = sbi->user_block_count; 2468 if (unlikely(is_sbi_flag_set(sbi, SBI_CP_DISABLED))) 2469 user_block_count -= sbi->unusable_block_count; 2470 2471 if (unlikely(valid_block_count > user_block_count)) { 2472 spin_unlock(&sbi->stat_lock); 2473 goto enospc; 2474 } --- 656 unchanged lines hidden (view full) --- 3131 3132static inline int is_file(struct inode *inode, int type) 3133{ 3134 return F2FS_I(inode)->i_advise & type; 3135} 3136 3137static inline void set_file(struct inode *inode, int type) 3138{ | 2449 user_block_count = sbi->user_block_count; 2450 if (unlikely(is_sbi_flag_set(sbi, SBI_CP_DISABLED))) 2451 user_block_count -= sbi->unusable_block_count; 2452 2453 if (unlikely(valid_block_count > user_block_count)) { 2454 spin_unlock(&sbi->stat_lock); 2455 goto enospc; 2456 } --- 656 unchanged lines hidden (view full) --- 3113 3114static inline int is_file(struct inode *inode, int type) 3115{ 3116 return F2FS_I(inode)->i_advise & type; 3117} 3118 3119static inline void set_file(struct inode *inode, int type) 3120{ |
3139 if (is_file(inode, type)) 3140 return; | |
3141 F2FS_I(inode)->i_advise |= type; 3142 f2fs_mark_inode_dirty_sync(inode, true); 3143} 3144 3145static inline void clear_file(struct inode *inode, int type) 3146{ | 3121 F2FS_I(inode)->i_advise |= type; 3122 f2fs_mark_inode_dirty_sync(inode, true); 3123} 3124 3125static inline void clear_file(struct inode *inode, int type) 3126{ |
3147 if (!is_file(inode, type)) 3148 return; | |
3149 F2FS_I(inode)->i_advise &= ~type; 3150 f2fs_mark_inode_dirty_sync(inode, true); 3151} 3152 3153static inline bool f2fs_is_time_consistent(struct inode *inode) 3154{ 3155 if (!timespec64_equal(F2FS_I(inode)->i_disk_time, &inode->i_atime)) 3156 return false; --- 268 unchanged lines hidden (view full) --- 3425bool f2fs_in_warm_node_list(struct f2fs_sb_info *sbi, struct page *page); 3426void f2fs_init_fsync_node_info(struct f2fs_sb_info *sbi); 3427void f2fs_del_fsync_node_entry(struct f2fs_sb_info *sbi, struct page *page); 3428void f2fs_reset_fsync_node_info(struct f2fs_sb_info *sbi); 3429int f2fs_need_dentry_mark(struct f2fs_sb_info *sbi, nid_t nid); 3430bool f2fs_is_checkpointed_node(struct f2fs_sb_info *sbi, nid_t nid); 3431bool f2fs_need_inode_block_update(struct f2fs_sb_info *sbi, nid_t ino); 3432int f2fs_get_node_info(struct f2fs_sb_info *sbi, nid_t nid, | 3127 F2FS_I(inode)->i_advise &= ~type; 3128 f2fs_mark_inode_dirty_sync(inode, true); 3129} 3130 3131static inline bool f2fs_is_time_consistent(struct inode *inode) 3132{ 3133 if (!timespec64_equal(F2FS_I(inode)->i_disk_time, &inode->i_atime)) 3134 return false; --- 268 unchanged lines hidden (view full) --- 3403bool f2fs_in_warm_node_list(struct f2fs_sb_info *sbi, struct page *page); 3404void f2fs_init_fsync_node_info(struct f2fs_sb_info *sbi); 3405void f2fs_del_fsync_node_entry(struct f2fs_sb_info *sbi, struct page *page); 3406void f2fs_reset_fsync_node_info(struct f2fs_sb_info *sbi); 3407int f2fs_need_dentry_mark(struct f2fs_sb_info *sbi, nid_t nid); 3408bool f2fs_is_checkpointed_node(struct f2fs_sb_info *sbi, nid_t nid); 3409bool f2fs_need_inode_block_update(struct f2fs_sb_info *sbi, nid_t ino); 3410int f2fs_get_node_info(struct f2fs_sb_info *sbi, nid_t nid, |
3433 struct node_info *ni, bool checkpoint_context); | 3411 struct node_info *ni); |
3434pgoff_t f2fs_get_next_page_offset(struct dnode_of_data *dn, pgoff_t pgofs); 3435int f2fs_get_dnode_of_data(struct dnode_of_data *dn, pgoff_t index, int mode); 3436int f2fs_truncate_inode_blocks(struct inode *inode, pgoff_t from); 3437int f2fs_truncate_xattr_node(struct inode *inode); 3438int f2fs_wait_on_node_pages_writeback(struct f2fs_sb_info *sbi, 3439 unsigned int seq_id); 3440bool f2fs_nat_bitmap_enabled(struct f2fs_sb_info *sbi); 3441int f2fs_remove_inode_page(struct inode *inode); --- 191 unchanged lines hidden (view full) --- 3633struct block_device *f2fs_target_device(struct f2fs_sb_info *sbi, 3634 block_t blk_addr, struct bio *bio); 3635int f2fs_target_device_index(struct f2fs_sb_info *sbi, block_t blkaddr); 3636void f2fs_set_data_blkaddr(struct dnode_of_data *dn); 3637void f2fs_update_data_blkaddr(struct dnode_of_data *dn, block_t blkaddr); 3638int f2fs_reserve_new_blocks(struct dnode_of_data *dn, blkcnt_t count); 3639int f2fs_reserve_new_block(struct dnode_of_data *dn); 3640int f2fs_get_block(struct dnode_of_data *dn, pgoff_t index); | 3412pgoff_t f2fs_get_next_page_offset(struct dnode_of_data *dn, pgoff_t pgofs); 3413int f2fs_get_dnode_of_data(struct dnode_of_data *dn, pgoff_t index, int mode); 3414int f2fs_truncate_inode_blocks(struct inode *inode, pgoff_t from); 3415int f2fs_truncate_xattr_node(struct inode *inode); 3416int f2fs_wait_on_node_pages_writeback(struct f2fs_sb_info *sbi, 3417 unsigned int seq_id); 3418bool f2fs_nat_bitmap_enabled(struct f2fs_sb_info *sbi); 3419int f2fs_remove_inode_page(struct inode *inode); --- 191 unchanged lines hidden (view full) --- 3611struct block_device *f2fs_target_device(struct f2fs_sb_info *sbi, 3612 block_t blk_addr, struct bio *bio); 3613int f2fs_target_device_index(struct f2fs_sb_info *sbi, block_t blkaddr); 3614void f2fs_set_data_blkaddr(struct dnode_of_data *dn); 3615void f2fs_update_data_blkaddr(struct dnode_of_data *dn, block_t blkaddr); 3616int f2fs_reserve_new_blocks(struct dnode_of_data *dn, blkcnt_t count); 3617int f2fs_reserve_new_block(struct dnode_of_data *dn); 3618int f2fs_get_block(struct dnode_of_data *dn, pgoff_t index); |
3619int f2fs_preallocate_blocks(struct kiocb *iocb, struct iov_iter *from); |
|
3641int f2fs_reserve_block(struct dnode_of_data *dn, pgoff_t index); 3642struct page *f2fs_get_read_data_page(struct inode *inode, pgoff_t index, 3643 int op_flags, bool for_write); 3644struct page *f2fs_find_data_page(struct inode *inode, pgoff_t index); 3645struct page *f2fs_get_lock_data_page(struct inode *inode, pgoff_t index, 3646 bool for_write); 3647struct page *f2fs_get_new_data_page(struct inode *inode, 3648 struct page *ipage, pgoff_t index, bool new_i_size); --- 6 unchanged lines hidden (view full) --- 3655int f2fs_encrypt_one_page(struct f2fs_io_info *fio); 3656bool f2fs_should_update_inplace(struct inode *inode, struct f2fs_io_info *fio); 3657bool f2fs_should_update_outplace(struct inode *inode, struct f2fs_io_info *fio); 3658int f2fs_write_single_data_page(struct page *page, int *submitted, 3659 struct bio **bio, sector_t *last_block, 3660 struct writeback_control *wbc, 3661 enum iostat_type io_type, 3662 int compr_blocks, bool allow_balance); | 3620int f2fs_reserve_block(struct dnode_of_data *dn, pgoff_t index); 3621struct page *f2fs_get_read_data_page(struct inode *inode, pgoff_t index, 3622 int op_flags, bool for_write); 3623struct page *f2fs_find_data_page(struct inode *inode, pgoff_t index); 3624struct page *f2fs_get_lock_data_page(struct inode *inode, pgoff_t index, 3625 bool for_write); 3626struct page *f2fs_get_new_data_page(struct inode *inode, 3627 struct page *ipage, pgoff_t index, bool new_i_size); --- 6 unchanged lines hidden (view full) --- 3634int f2fs_encrypt_one_page(struct f2fs_io_info *fio); 3635bool f2fs_should_update_inplace(struct inode *inode, struct f2fs_io_info *fio); 3636bool f2fs_should_update_outplace(struct inode *inode, struct f2fs_io_info *fio); 3637int f2fs_write_single_data_page(struct page *page, int *submitted, 3638 struct bio **bio, sector_t *last_block, 3639 struct writeback_control *wbc, 3640 enum iostat_type io_type, 3641 int compr_blocks, bool allow_balance); |
3663void f2fs_write_failed(struct inode *inode, loff_t to); | |
3664void f2fs_invalidate_page(struct page *page, unsigned int offset, 3665 unsigned int length); 3666int f2fs_release_page(struct page *page, gfp_t wait); 3667#ifdef CONFIG_MIGRATION 3668int f2fs_migrate_page(struct address_space *mapping, struct page *newpage, 3669 struct page *page, enum migrate_mode mode); 3670#endif 3671bool f2fs_overwrite_io(struct inode *inode, loff_t pos, size_t len); 3672void f2fs_clear_page_cache_dirty_tag(struct page *page); 3673int f2fs_init_post_read_processing(void); 3674void f2fs_destroy_post_read_processing(void); 3675int f2fs_init_post_read_wq(struct f2fs_sb_info *sbi); 3676void f2fs_destroy_post_read_wq(struct f2fs_sb_info *sbi); | 3642void f2fs_invalidate_page(struct page *page, unsigned int offset, 3643 unsigned int length); 3644int f2fs_release_page(struct page *page, gfp_t wait); 3645#ifdef CONFIG_MIGRATION 3646int f2fs_migrate_page(struct address_space *mapping, struct page *newpage, 3647 struct page *page, enum migrate_mode mode); 3648#endif 3649bool f2fs_overwrite_io(struct inode *inode, loff_t pos, size_t len); 3650void f2fs_clear_page_cache_dirty_tag(struct page *page); 3651int f2fs_init_post_read_processing(void); 3652void f2fs_destroy_post_read_processing(void); 3653int f2fs_init_post_read_wq(struct f2fs_sb_info *sbi); 3654void f2fs_destroy_post_read_wq(struct f2fs_sb_info *sbi); |
3677extern const struct iomap_ops f2fs_iomap_ops; | |
3678 3679/* 3680 * gc.c 3681 */ 3682int f2fs_start_gc_thread(struct f2fs_sb_info *sbi); 3683void f2fs_stop_gc_thread(struct f2fs_sb_info *sbi); 3684block_t f2fs_start_bidx_of_node(unsigned int node_ofs, struct inode *inode); 3685int f2fs_gc(struct f2fs_sb_info *sbi, bool sync, bool background, bool force, --- 747 unchanged lines hidden --- | 3655 3656/* 3657 * gc.c 3658 */ 3659int f2fs_start_gc_thread(struct f2fs_sb_info *sbi); 3660void f2fs_stop_gc_thread(struct f2fs_sb_info *sbi); 3661block_t f2fs_start_bidx_of_node(unsigned int node_ofs, struct inode *inode); 3662int f2fs_gc(struct f2fs_sb_info *sbi, bool sync, bool background, bool force, --- 747 unchanged lines hidden --- |