f2fs.h (e5451c8f8330e03ad3cfa16048b4daf961af434f) | f2fs.h (4356e48e64374ceac6e4313244eb65158a954b40) |
---|---|
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 --- 169 unchanged lines hidden (view full) --- 178struct fsync_inode_entry { 179 struct list_head list; /* list head */ 180 struct inode *inode; /* vfs inode pointer */ 181 block_t blkaddr; /* block address locating the last fsync */ 182 block_t last_dentry; /* block address locating the last dentry */ 183 block_t last_inode; /* block address locating the last inode */ 184}; 185 | 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 --- 169 unchanged lines hidden (view full) --- 178struct fsync_inode_entry { 179 struct list_head list; /* list head */ 180 struct inode *inode; /* vfs inode pointer */ 181 block_t blkaddr; /* block address locating the last fsync */ 182 block_t last_dentry; /* block address locating the last dentry */ 183 block_t last_inode; /* block address locating the last inode */ 184}; 185 |
186#define nats_in_cursum(sum) (le16_to_cpu(sum->n_nats)) 187#define sits_in_cursum(sum) (le16_to_cpu(sum->n_sits)) | 186#define nats_in_cursum(jnl) (le16_to_cpu(jnl->n_nats)) 187#define sits_in_cursum(jnl) (le16_to_cpu(jnl->n_sits)) |
188 | 188 |
189#define nat_in_journal(sum, i) (sum->nat_j.entries[i].ne) 190#define nid_in_journal(sum, i) (sum->nat_j.entries[i].nid) 191#define sit_in_journal(sum, i) (sum->sit_j.entries[i].se) 192#define segno_in_journal(sum, i) (sum->sit_j.entries[i].segno) | 189#define nat_in_journal(jnl, i) (jnl->nat_j.entries[i].ne) 190#define nid_in_journal(jnl, i) (jnl->nat_j.entries[i].nid) 191#define sit_in_journal(jnl, i) (jnl->sit_j.entries[i].se) 192#define segno_in_journal(jnl, i) (jnl->sit_j.entries[i].segno) |
193 | 193 |
194#define MAX_NAT_JENTRIES(sum) (NAT_JOURNAL_ENTRIES - nats_in_cursum(sum)) 195#define MAX_SIT_JENTRIES(sum) (SIT_JOURNAL_ENTRIES - sits_in_cursum(sum)) | 194#define MAX_NAT_JENTRIES(jnl) (NAT_JOURNAL_ENTRIES - nats_in_cursum(jnl)) 195#define MAX_SIT_JENTRIES(jnl) (SIT_JOURNAL_ENTRIES - sits_in_cursum(jnl)) |
196 | 196 |
197static inline int update_nats_in_cursum(struct f2fs_summary_block *rs, int i) | 197static inline int update_nats_in_cursum(struct f2fs_journal *journal, int i) |
198{ | 198{ |
199 int before = nats_in_cursum(rs); 200 rs->n_nats = cpu_to_le16(before + i); | 199 int before = nats_in_cursum(journal); 200 journal->n_nats = cpu_to_le16(before + i); |
201 return before; 202} 203 | 201 return before; 202} 203 |
204static inline int update_sits_in_cursum(struct f2fs_summary_block *rs, int i) | 204static inline int update_sits_in_cursum(struct f2fs_journal *journal, int i) |
205{ | 205{ |
206 int before = sits_in_cursum(rs); 207 rs->n_sits = cpu_to_le16(before + i); | 206 int before = sits_in_cursum(journal); 207 journal->n_sits = cpu_to_le16(before + i); |
208 return before; 209} 210 | 208 return before; 209} 210 |
211static inline bool __has_cursum_space(struct f2fs_summary_block *sum, int size, 212 int type) | 211static inline bool __has_cursum_space(struct f2fs_journal *journal, 212 int size, int type) |
213{ 214 if (type == NAT_JOURNAL) | 213{ 214 if (type == NAT_JOURNAL) |
215 return size <= MAX_NAT_JENTRIES(sum); 216 return size <= MAX_SIT_JENTRIES(sum); | 215 return size <= MAX_NAT_JENTRIES(journal); 216 return size <= MAX_SIT_JENTRIES(journal); |
217} 218 219/* 220 * ioctl commands 221 */ 222#define F2FS_IOC_GETFLAGS FS_IOC_GETFLAGS 223#define F2FS_IOC_SETFLAGS FS_IOC_SETFLAGS 224#define F2FS_IOC_GETVERSION FS_IOC_GETVERSION --- 124 unchanged lines hidden (view full) --- 349 u32 blk; /* start block address of the extent */ 350 unsigned int len; /* length of the extent */ 351}; 352 353struct extent_node { 354 struct rb_node rb_node; /* rb node located in rb-tree */ 355 struct list_head list; /* node in global extent list of sbi */ 356 struct extent_info ei; /* extent info */ | 217} 218 219/* 220 * ioctl commands 221 */ 222#define F2FS_IOC_GETFLAGS FS_IOC_GETFLAGS 223#define F2FS_IOC_SETFLAGS FS_IOC_SETFLAGS 224#define F2FS_IOC_GETVERSION FS_IOC_GETVERSION --- 124 unchanged lines hidden (view full) --- 349 u32 blk; /* start block address of the extent */ 350 unsigned int len; /* length of the extent */ 351}; 352 353struct extent_node { 354 struct rb_node rb_node; /* rb node located in rb-tree */ 355 struct list_head list; /* node in global extent list of sbi */ 356 struct extent_info ei; /* extent info */ |
357 struct extent_tree *et; /* extent tree pointer */ |
|
357}; 358 359struct extent_tree { 360 nid_t ino; /* inode number */ 361 struct rb_root root; /* root of extent info rb-tree */ 362 struct extent_node *cached_en; /* recently accessed extent node */ 363 struct extent_info largest; /* largested extent info */ 364 struct list_head list; /* to be used by sbi->zombie_list */ --- 12 unchanged lines hidden (view full) --- 377#define F2FS_MAP_FLAGS (F2FS_MAP_NEW | F2FS_MAP_MAPPED |\ 378 F2FS_MAP_UNWRITTEN) 379 380struct f2fs_map_blocks { 381 block_t m_pblk; 382 block_t m_lblk; 383 unsigned int m_len; 384 unsigned int m_flags; | 358}; 359 360struct extent_tree { 361 nid_t ino; /* inode number */ 362 struct rb_root root; /* root of extent info rb-tree */ 363 struct extent_node *cached_en; /* recently accessed extent node */ 364 struct extent_info largest; /* largested extent info */ 365 struct list_head list; /* to be used by sbi->zombie_list */ --- 12 unchanged lines hidden (view full) --- 378#define F2FS_MAP_FLAGS (F2FS_MAP_NEW | F2FS_MAP_MAPPED |\ 379 F2FS_MAP_UNWRITTEN) 380 381struct f2fs_map_blocks { 382 block_t m_pblk; 383 block_t m_lblk; 384 unsigned int m_len; 385 unsigned int m_flags; |
386 pgoff_t *m_next_pgofs; /* point next possible non-hole pgofs */ |
|
385}; 386 387/* for flag in get_data_block */ 388#define F2FS_GET_BLOCK_READ 0 389#define F2FS_GET_BLOCK_DIO 1 390#define F2FS_GET_BLOCK_FIEMAP 2 391#define F2FS_GET_BLOCK_BMAP 3 | 387}; 388 389/* for flag in get_data_block */ 390#define F2FS_GET_BLOCK_READ 0 391#define F2FS_GET_BLOCK_DIO 1 392#define F2FS_GET_BLOCK_FIEMAP 2 393#define F2FS_GET_BLOCK_BMAP 3 |
394#define F2FS_GET_BLOCK_PRE_DIO 4 395#define F2FS_GET_BLOCK_PRE_AIO 5 |
|
392 393/* 394 * i_advise uses FADVISE_XXX_BIT. We can add additional hints later. 395 */ 396#define FADVISE_COLD_BIT 0x01 397#define FADVISE_LOST_PINO_BIT 0x02 398#define FADVISE_ENCRYPT_BIT 0x04 399#define FADVISE_ENC_NAME_BIT 0x08 --- 110 unchanged lines hidden (view full) --- 510 511struct f2fs_nm_info { 512 block_t nat_blkaddr; /* base disk address of NAT */ 513 nid_t max_nid; /* maximum possible node ids */ 514 nid_t available_nids; /* maximum available node ids */ 515 nid_t next_scan_nid; /* the next nid to be scanned */ 516 unsigned int ram_thresh; /* control the memory footprint */ 517 unsigned int ra_nid_pages; /* # of nid pages to be readaheaded */ | 396 397/* 398 * i_advise uses FADVISE_XXX_BIT. We can add additional hints later. 399 */ 400#define FADVISE_COLD_BIT 0x01 401#define FADVISE_LOST_PINO_BIT 0x02 402#define FADVISE_ENCRYPT_BIT 0x04 403#define FADVISE_ENC_NAME_BIT 0x08 --- 110 unchanged lines hidden (view full) --- 514 515struct f2fs_nm_info { 516 block_t nat_blkaddr; /* base disk address of NAT */ 517 nid_t max_nid; /* maximum possible node ids */ 518 nid_t available_nids; /* maximum available node ids */ 519 nid_t next_scan_nid; /* the next nid to be scanned */ 520 unsigned int ram_thresh; /* control the memory footprint */ 521 unsigned int ra_nid_pages; /* # of nid pages to be readaheaded */ |
522 unsigned int dirty_nats_ratio; /* control dirty nats ratio threshold */ |
|
518 519 /* NAT cache management */ 520 struct radix_tree_root nat_root;/* root of the nat entry cache */ 521 struct radix_tree_root nat_set_root;/* root of the nat set cache */ 522 struct rw_semaphore nat_tree_lock; /* protect nat_tree_lock */ 523 struct list_head nat_entries; /* cached nat entry list (clean) */ 524 unsigned int nat_cnt; /* the # of cached nat entries */ 525 unsigned int dirty_nat_cnt; /* total num of nat entries in set */ --- 18 unchanged lines hidden (view full) --- 544struct dnode_of_data { 545 struct inode *inode; /* vfs inode pointer */ 546 struct page *inode_page; /* its inode page, NULL is possible */ 547 struct page *node_page; /* cached direct node page */ 548 nid_t nid; /* node id of the direct node block */ 549 unsigned int ofs_in_node; /* data offset in the node page */ 550 bool inode_page_locked; /* inode page is locked or not */ 551 bool node_changed; /* is node block changed */ | 523 524 /* NAT cache management */ 525 struct radix_tree_root nat_root;/* root of the nat entry cache */ 526 struct radix_tree_root nat_set_root;/* root of the nat set cache */ 527 struct rw_semaphore nat_tree_lock; /* protect nat_tree_lock */ 528 struct list_head nat_entries; /* cached nat entry list (clean) */ 529 unsigned int nat_cnt; /* the # of cached nat entries */ 530 unsigned int dirty_nat_cnt; /* total num of nat entries in set */ --- 18 unchanged lines hidden (view full) --- 549struct dnode_of_data { 550 struct inode *inode; /* vfs inode pointer */ 551 struct page *inode_page; /* its inode page, NULL is possible */ 552 struct page *node_page; /* cached direct node page */ 553 nid_t nid; /* node id of the direct node block */ 554 unsigned int ofs_in_node; /* data offset in the node page */ 555 bool inode_page_locked; /* inode page is locked or not */ 556 bool node_changed; /* is node block changed */ |
557 char cur_level; /* level of hole node page */ 558 char max_level; /* level of current page located */ |
|
552 block_t data_blkaddr; /* block address of the node block */ 553}; 554 555static inline void set_new_dnode(struct dnode_of_data *dn, struct inode *inode, 556 struct page *ipage, struct page *npage, nid_t nid) 557{ 558 memset(dn, 0, sizeof(*dn)); 559 dn->inode = inode; --- 114 unchanged lines hidden (view full) --- 674enum page_type { 675 DATA, 676 NODE, 677 META, 678 NR_PAGE_TYPE, 679 META_FLUSH, 680 INMEM, /* the below types are used by tracepoints only. */ 681 INMEM_DROP, | 559 block_t data_blkaddr; /* block address of the node block */ 560}; 561 562static inline void set_new_dnode(struct dnode_of_data *dn, struct inode *inode, 563 struct page *ipage, struct page *npage, nid_t nid) 564{ 565 memset(dn, 0, sizeof(*dn)); 566 dn->inode = inode; --- 114 unchanged lines hidden (view full) --- 681enum page_type { 682 DATA, 683 NODE, 684 META, 685 NR_PAGE_TYPE, 686 META_FLUSH, 687 INMEM, /* the below types are used by tracepoints only. */ 688 INMEM_DROP, |
689 INMEM_REVOKE, |
|
682 IPU, 683 OPU, 684}; 685 686struct f2fs_io_info { 687 struct f2fs_sb_info *sbi; /* f2fs_sb_info pointer */ 688 enum page_type type; /* contains DATA/NODE/META/META_FLUSH */ 689 int rw; /* contains R/RS/W/WS with REQ_META/REQ_PRIO */ | 690 IPU, 691 OPU, 692}; 693 694struct f2fs_io_info { 695 struct f2fs_sb_info *sbi; /* f2fs_sb_info pointer */ 696 enum page_type type; /* contains DATA/NODE/META/META_FLUSH */ 697 int rw; /* contains R/RS/W/WS with REQ_META/REQ_PRIO */ |
690 block_t blk_addr; /* block address to be written */ | 698 block_t new_blkaddr; /* new block address to be written */ 699 block_t old_blkaddr; /* old block address before Cow */ |
691 struct page *page; /* page to be written */ 692 struct page *encrypted_page; /* encrypted page */ 693}; 694 695#define is_read_io(rw) (((rw) & 1) == READ) 696struct f2fs_bio_info { 697 struct f2fs_sb_info *sbi; /* f2fs superblock */ 698 struct bio *bio; /* bios to merge */ --- 140 unchanged lines hidden (view full) --- 839 /* For sysfs suppport */ 840 struct kobject s_kobj; 841 struct completion s_kobj_unregister; 842 843 /* For shrinker support */ 844 struct list_head s_list; 845 struct mutex umount_mutex; 846 unsigned int shrinker_run_no; | 700 struct page *page; /* page to be written */ 701 struct page *encrypted_page; /* encrypted page */ 702}; 703 704#define is_read_io(rw) (((rw) & 1) == READ) 705struct f2fs_bio_info { 706 struct f2fs_sb_info *sbi; /* f2fs superblock */ 707 struct bio *bio; /* bios to merge */ --- 140 unchanged lines hidden (view full) --- 848 /* For sysfs suppport */ 849 struct kobject s_kobj; 850 struct completion s_kobj_unregister; 851 852 /* For shrinker support */ 853 struct list_head s_list; 854 struct mutex umount_mutex; 855 unsigned int shrinker_run_no; |
856 857 /* For write statistics */ 858 u64 sectors_written_start; 859 u64 kbytes_written; |
|
847}; 848 | 860}; 861 |
862/* For write statistics. Suppose sector size is 512 bytes, 863 * and the return value is in kbytes. s is of struct f2fs_sb_info. 864 */ 865#define BD_PART_WRITTEN(s) \ 866(((u64)part_stat_read(s->sb->s_bdev->bd_part, sectors[1]) - \ 867 s->sectors_written_start) >> 1) 868 |
|
849static inline void f2fs_update_time(struct f2fs_sb_info *sbi, int type) 850{ 851 sbi->last_time[type] = jiffies; 852} 853 854static inline bool f2fs_time_over(struct f2fs_sb_info *sbi, int type) 855{ 856 struct timespec ts = {sbi->interval_time[type], 0}; --- 663 unchanged lines hidden (view full) --- 1520 ri->i_inline |= F2FS_INLINE_DOTS; 1521} 1522 1523static inline int f2fs_has_inline_xattr(struct inode *inode) 1524{ 1525 return is_inode_flag_set(F2FS_I(inode), FI_INLINE_XATTR); 1526} 1527 | 869static inline void f2fs_update_time(struct f2fs_sb_info *sbi, int type) 870{ 871 sbi->last_time[type] = jiffies; 872} 873 874static inline bool f2fs_time_over(struct f2fs_sb_info *sbi, int type) 875{ 876 struct timespec ts = {sbi->interval_time[type], 0}; --- 663 unchanged lines hidden (view full) --- 1540 ri->i_inline |= F2FS_INLINE_DOTS; 1541} 1542 1543static inline int f2fs_has_inline_xattr(struct inode *inode) 1544{ 1545 return is_inode_flag_set(F2FS_I(inode), FI_INLINE_XATTR); 1546} 1547 |
1528static inline unsigned int addrs_per_inode(struct f2fs_inode_info *fi) | 1548static inline unsigned int addrs_per_inode(struct inode *inode) |
1529{ | 1549{ |
1530 if (f2fs_has_inline_xattr(&fi->vfs_inode)) | 1550 if (f2fs_has_inline_xattr(inode)) |
1531 return DEF_ADDRS_PER_INODE - F2FS_INLINE_XATTR_ADDRS; 1532 return DEF_ADDRS_PER_INODE; 1533} 1534 1535static inline void *inline_xattr_addr(struct page *page) 1536{ 1537 struct f2fs_inode *ri = F2FS_INODE(page); 1538 return (void *)&(ri->i_addr[DEF_ADDRS_PER_INODE - --- 137 unchanged lines hidden (view full) --- 1676 return ret; 1677} 1678 1679#define get_inode_mode(i) \ 1680 ((is_inode_flag_set(F2FS_I(i), FI_ACL_MODE)) ? \ 1681 (F2FS_I(i)->i_acl_mode) : ((i)->i_mode)) 1682 1683/* get offset of first page in next direct node */ | 1551 return DEF_ADDRS_PER_INODE - F2FS_INLINE_XATTR_ADDRS; 1552 return DEF_ADDRS_PER_INODE; 1553} 1554 1555static inline void *inline_xattr_addr(struct page *page) 1556{ 1557 struct f2fs_inode *ri = F2FS_INODE(page); 1558 return (void *)&(ri->i_addr[DEF_ADDRS_PER_INODE - --- 137 unchanged lines hidden (view full) --- 1696 return ret; 1697} 1698 1699#define get_inode_mode(i) \ 1700 ((is_inode_flag_set(F2FS_I(i), FI_ACL_MODE)) ? \ 1701 (F2FS_I(i)->i_acl_mode) : ((i)->i_mode)) 1702 1703/* get offset of first page in next direct node */ |
1684#define PGOFS_OF_NEXT_DNODE(pgofs, fi) \ 1685 ((pgofs < ADDRS_PER_INODE(fi)) ? ADDRS_PER_INODE(fi) : \ 1686 (pgofs - ADDRS_PER_INODE(fi) + ADDRS_PER_BLOCK) / \ 1687 ADDRS_PER_BLOCK * ADDRS_PER_BLOCK + ADDRS_PER_INODE(fi)) | 1704#define PGOFS_OF_NEXT_DNODE(pgofs, inode) \ 1705 ((pgofs < ADDRS_PER_INODE(inode)) ? ADDRS_PER_INODE(inode) : \ 1706 (pgofs - ADDRS_PER_INODE(inode) + ADDRS_PER_BLOCK) / \ 1707 ADDRS_PER_BLOCK * ADDRS_PER_BLOCK + ADDRS_PER_INODE(inode)) |
1688 1689/* 1690 * file.c 1691 */ 1692int f2fs_sync_file(struct file *, loff_t, loff_t, int); 1693void truncate_data_blocks(struct dnode_of_data *); 1694int truncate_blocks(struct inode *, u64, bool); 1695int f2fs_truncate(struct inode *, bool); --- 62 unchanged lines hidden (view full) --- 1758 1759/* 1760 * super.c 1761 */ 1762int f2fs_commit_super(struct f2fs_sb_info *, bool); 1763int f2fs_sync_fs(struct super_block *, int); 1764extern __printf(3, 4) 1765void f2fs_msg(struct super_block *, const char *, const char *, ...); | 1708 1709/* 1710 * file.c 1711 */ 1712int f2fs_sync_file(struct file *, loff_t, loff_t, int); 1713void truncate_data_blocks(struct dnode_of_data *); 1714int truncate_blocks(struct inode *, u64, bool); 1715int f2fs_truncate(struct inode *, bool); --- 62 unchanged lines hidden (view full) --- 1778 1779/* 1780 * super.c 1781 */ 1782int f2fs_commit_super(struct f2fs_sb_info *, bool); 1783int f2fs_sync_fs(struct super_block *, int); 1784extern __printf(3, 4) 1785void f2fs_msg(struct super_block *, const char *, const char *, ...); |
1786int sanity_check_ckpt(struct f2fs_sb_info *sbi); |
|
1766 1767/* 1768 * hash.c 1769 */ 1770f2fs_hash_t f2fs_dentry_hash(const struct qstr *); 1771 1772/* 1773 * node.c 1774 */ 1775struct dnode_of_data; 1776struct node_info; 1777 1778bool available_free_memory(struct f2fs_sb_info *, int); 1779int need_dentry_mark(struct f2fs_sb_info *, nid_t); 1780bool is_checkpointed_node(struct f2fs_sb_info *, nid_t); 1781bool need_inode_block_update(struct f2fs_sb_info *, nid_t); 1782void get_node_info(struct f2fs_sb_info *, nid_t, struct node_info *); | 1787 1788/* 1789 * hash.c 1790 */ 1791f2fs_hash_t f2fs_dentry_hash(const struct qstr *); 1792 1793/* 1794 * node.c 1795 */ 1796struct dnode_of_data; 1797struct node_info; 1798 1799bool available_free_memory(struct f2fs_sb_info *, int); 1800int need_dentry_mark(struct f2fs_sb_info *, nid_t); 1801bool is_checkpointed_node(struct f2fs_sb_info *, nid_t); 1802bool need_inode_block_update(struct f2fs_sb_info *, nid_t); 1803void get_node_info(struct f2fs_sb_info *, nid_t, struct node_info *); |
1804pgoff_t get_next_page_offset(struct dnode_of_data *, pgoff_t); |
|
1783int get_dnode_of_data(struct dnode_of_data *, pgoff_t, int); 1784int truncate_inode_blocks(struct inode *, pgoff_t); 1785int truncate_xattr_node(struct inode *, struct page *); 1786int wait_on_node_pages_writeback(struct f2fs_sb_info *, nid_t); 1787int remove_inode_page(struct inode *); 1788struct page *new_inode_page(struct inode *); 1789struct page *new_node_page(struct dnode_of_data *, unsigned int, struct page *); 1790void ra_node_page(struct f2fs_sb_info *, nid_t); --- 15 unchanged lines hidden (view full) --- 1806void destroy_node_manager(struct f2fs_sb_info *); 1807int __init create_node_manager_caches(void); 1808void destroy_node_manager_caches(void); 1809 1810/* 1811 * segment.c 1812 */ 1813void register_inmem_page(struct inode *, struct page *); | 1805int get_dnode_of_data(struct dnode_of_data *, pgoff_t, int); 1806int truncate_inode_blocks(struct inode *, pgoff_t); 1807int truncate_xattr_node(struct inode *, struct page *); 1808int wait_on_node_pages_writeback(struct f2fs_sb_info *, nid_t); 1809int remove_inode_page(struct inode *); 1810struct page *new_inode_page(struct inode *); 1811struct page *new_node_page(struct dnode_of_data *, unsigned int, struct page *); 1812void ra_node_page(struct f2fs_sb_info *, nid_t); --- 15 unchanged lines hidden (view full) --- 1828void destroy_node_manager(struct f2fs_sb_info *); 1829int __init create_node_manager_caches(void); 1830void destroy_node_manager_caches(void); 1831 1832/* 1833 * segment.c 1834 */ 1835void register_inmem_page(struct inode *, struct page *); |
1814int commit_inmem_pages(struct inode *, bool); | 1836void drop_inmem_pages(struct inode *); 1837int commit_inmem_pages(struct inode *); |
1815void f2fs_balance_fs(struct f2fs_sb_info *, bool); 1816void f2fs_balance_fs_bg(struct f2fs_sb_info *); 1817int f2fs_issue_flush(struct f2fs_sb_info *); 1818int create_flush_cmd_control(struct f2fs_sb_info *); 1819void destroy_flush_cmd_control(struct f2fs_sb_info *); 1820void invalidate_blocks(struct f2fs_sb_info *, block_t); 1821bool is_checkpointed_data(struct f2fs_sb_info *, block_t); 1822void refresh_sit_entry(struct f2fs_sb_info *, block_t, block_t); --- 4 unchanged lines hidden (view full) --- 1827void allocate_new_segments(struct f2fs_sb_info *); 1828int f2fs_trim_fs(struct f2fs_sb_info *, struct fstrim_range *); 1829struct page *get_sum_page(struct f2fs_sb_info *, unsigned int); 1830void update_meta_page(struct f2fs_sb_info *, void *, block_t); 1831void write_meta_page(struct f2fs_sb_info *, struct page *); 1832void write_node_page(unsigned int, struct f2fs_io_info *); 1833void write_data_page(struct dnode_of_data *, struct f2fs_io_info *); 1834void rewrite_data_page(struct f2fs_io_info *); | 1838void f2fs_balance_fs(struct f2fs_sb_info *, bool); 1839void f2fs_balance_fs_bg(struct f2fs_sb_info *); 1840int f2fs_issue_flush(struct f2fs_sb_info *); 1841int create_flush_cmd_control(struct f2fs_sb_info *); 1842void destroy_flush_cmd_control(struct f2fs_sb_info *); 1843void invalidate_blocks(struct f2fs_sb_info *, block_t); 1844bool is_checkpointed_data(struct f2fs_sb_info *, block_t); 1845void refresh_sit_entry(struct f2fs_sb_info *, block_t, block_t); --- 4 unchanged lines hidden (view full) --- 1850void allocate_new_segments(struct f2fs_sb_info *); 1851int f2fs_trim_fs(struct f2fs_sb_info *, struct fstrim_range *); 1852struct page *get_sum_page(struct f2fs_sb_info *, unsigned int); 1853void update_meta_page(struct f2fs_sb_info *, void *, block_t); 1854void write_meta_page(struct f2fs_sb_info *, struct page *); 1855void write_node_page(unsigned int, struct f2fs_io_info *); 1856void write_data_page(struct dnode_of_data *, struct f2fs_io_info *); 1857void rewrite_data_page(struct f2fs_io_info *); |
1858void __f2fs_replace_block(struct f2fs_sb_info *, struct f2fs_summary *, 1859 block_t, block_t, bool, bool); |
|
1835void f2fs_replace_block(struct f2fs_sb_info *, struct dnode_of_data *, | 1860void f2fs_replace_block(struct f2fs_sb_info *, struct dnode_of_data *, |
1836 block_t, block_t, unsigned char, bool); | 1861 block_t, block_t, unsigned char, bool, bool); |
1837void allocate_data_block(struct f2fs_sb_info *, struct page *, 1838 block_t, block_t *, struct f2fs_summary *, int); | 1862void allocate_data_block(struct f2fs_sb_info *, struct page *, 1863 block_t, block_t *, struct f2fs_summary *, int); |
1839void f2fs_wait_on_page_writeback(struct page *, enum page_type); | 1864void f2fs_wait_on_page_writeback(struct page *, enum page_type, bool); |
1840void f2fs_wait_on_encrypted_page_writeback(struct f2fs_sb_info *, block_t); 1841void write_data_summaries(struct f2fs_sb_info *, block_t); 1842void write_node_summaries(struct f2fs_sb_info *, block_t); | 1865void f2fs_wait_on_encrypted_page_writeback(struct f2fs_sb_info *, block_t); 1866void write_data_summaries(struct f2fs_sb_info *, block_t); 1867void write_node_summaries(struct f2fs_sb_info *, block_t); |
1843int lookup_journal_in_cursum(struct f2fs_summary_block *, 1844 int, unsigned int, int); | 1868int lookup_journal_in_cursum(struct f2fs_journal *, int, unsigned int, int); |
1845void flush_sit_entries(struct f2fs_sb_info *, struct cp_control *); 1846int build_segment_manager(struct f2fs_sb_info *); 1847void destroy_segment_manager(struct f2fs_sb_info *); 1848int __init create_segment_manager_caches(void); 1849void destroy_segment_manager_caches(void); 1850 1851/* 1852 * checkpoint.c --- 23 unchanged lines hidden (view full) --- 1876void init_ino_entry_info(struct f2fs_sb_info *); 1877int __init create_checkpoint_caches(void); 1878void destroy_checkpoint_caches(void); 1879 1880/* 1881 * data.c 1882 */ 1883void f2fs_submit_merged_bio(struct f2fs_sb_info *, enum page_type, int); | 1869void flush_sit_entries(struct f2fs_sb_info *, struct cp_control *); 1870int build_segment_manager(struct f2fs_sb_info *); 1871void destroy_segment_manager(struct f2fs_sb_info *); 1872int __init create_segment_manager_caches(void); 1873void destroy_segment_manager_caches(void); 1874 1875/* 1876 * checkpoint.c --- 23 unchanged lines hidden (view full) --- 1900void init_ino_entry_info(struct f2fs_sb_info *); 1901int __init create_checkpoint_caches(void); 1902void destroy_checkpoint_caches(void); 1903 1904/* 1905 * data.c 1906 */ 1907void f2fs_submit_merged_bio(struct f2fs_sb_info *, enum page_type, int); |
1908void f2fs_submit_merged_bio_cond(struct f2fs_sb_info *, struct inode *, 1909 struct page *, nid_t, enum page_type, int); |
|
1884int f2fs_submit_page_bio(struct f2fs_io_info *); 1885void f2fs_submit_page_mbio(struct f2fs_io_info *); 1886void set_data_blkaddr(struct dnode_of_data *); 1887int reserve_new_block(struct dnode_of_data *); 1888int f2fs_get_block(struct dnode_of_data *, pgoff_t); | 1910int f2fs_submit_page_bio(struct f2fs_io_info *); 1911void f2fs_submit_page_mbio(struct f2fs_io_info *); 1912void set_data_blkaddr(struct dnode_of_data *); 1913int reserve_new_block(struct dnode_of_data *); 1914int f2fs_get_block(struct dnode_of_data *, pgoff_t); |
1915ssize_t f2fs_preallocate_blocks(struct kiocb *, struct iov_iter *); |
|
1889int f2fs_reserve_block(struct dnode_of_data *, pgoff_t); 1890struct page *get_read_data_page(struct inode *, pgoff_t, int, bool); 1891struct page *find_data_page(struct inode *, pgoff_t); 1892struct page *get_lock_data_page(struct inode *, pgoff_t, bool); 1893struct page *get_new_data_page(struct inode *, struct page *, pgoff_t, bool); 1894int do_write_data_page(struct f2fs_io_info *); 1895int f2fs_map_blocks(struct inode *, struct f2fs_map_blocks *, int, int); 1896int f2fs_fiemap(struct inode *inode, struct fiemap_extent_info *, u64, u64); 1897void f2fs_invalidate_page(struct page *, unsigned int, unsigned int); 1898int f2fs_release_page(struct page *, gfp_t); 1899 1900/* 1901 * gc.c 1902 */ 1903int start_gc_thread(struct f2fs_sb_info *); 1904void stop_gc_thread(struct f2fs_sb_info *); | 1916int f2fs_reserve_block(struct dnode_of_data *, pgoff_t); 1917struct page *get_read_data_page(struct inode *, pgoff_t, int, bool); 1918struct page *find_data_page(struct inode *, pgoff_t); 1919struct page *get_lock_data_page(struct inode *, pgoff_t, bool); 1920struct page *get_new_data_page(struct inode *, struct page *, pgoff_t, bool); 1921int do_write_data_page(struct f2fs_io_info *); 1922int f2fs_map_blocks(struct inode *, struct f2fs_map_blocks *, int, int); 1923int f2fs_fiemap(struct inode *inode, struct fiemap_extent_info *, u64, u64); 1924void f2fs_invalidate_page(struct page *, unsigned int, unsigned int); 1925int f2fs_release_page(struct page *, gfp_t); 1926 1927/* 1928 * gc.c 1929 */ 1930int start_gc_thread(struct f2fs_sb_info *); 1931void stop_gc_thread(struct f2fs_sb_info *); |
1905block_t start_bidx_of_node(unsigned int, struct f2fs_inode_info *); | 1932block_t start_bidx_of_node(unsigned int, struct inode *); |
1906int f2fs_gc(struct f2fs_sb_info *, bool); 1907void build_gc_manager(struct f2fs_sb_info *); 1908 1909/* 1910 * recovery.c 1911 */ 1912int recover_fsync_data(struct f2fs_sb_info *); 1913bool space_for_roll_forward(struct f2fs_sb_info *); --- 272 unchanged lines hidden (view full) --- 2186 2187/* crypt.c */ 2188extern struct kmem_cache *f2fs_crypt_info_cachep; 2189bool f2fs_valid_contents_enc_mode(uint32_t); 2190uint32_t f2fs_validate_encryption_key_size(uint32_t, uint32_t); 2191struct f2fs_crypto_ctx *f2fs_get_crypto_ctx(struct inode *); 2192void f2fs_release_crypto_ctx(struct f2fs_crypto_ctx *); 2193struct page *f2fs_encrypt(struct inode *, struct page *); | 1933int f2fs_gc(struct f2fs_sb_info *, bool); 1934void build_gc_manager(struct f2fs_sb_info *); 1935 1936/* 1937 * recovery.c 1938 */ 1939int recover_fsync_data(struct f2fs_sb_info *); 1940bool space_for_roll_forward(struct f2fs_sb_info *); --- 272 unchanged lines hidden (view full) --- 2213 2214/* crypt.c */ 2215extern struct kmem_cache *f2fs_crypt_info_cachep; 2216bool f2fs_valid_contents_enc_mode(uint32_t); 2217uint32_t f2fs_validate_encryption_key_size(uint32_t, uint32_t); 2218struct f2fs_crypto_ctx *f2fs_get_crypto_ctx(struct inode *); 2219void f2fs_release_crypto_ctx(struct f2fs_crypto_ctx *); 2220struct page *f2fs_encrypt(struct inode *, struct page *); |
2194int f2fs_decrypt(struct f2fs_crypto_ctx *, struct page *); 2195int f2fs_decrypt_one(struct inode *, struct page *); | 2221int f2fs_decrypt(struct page *); |
2196void f2fs_end_io_crypto_work(struct f2fs_crypto_ctx *, struct bio *); 2197 2198/* crypto_key.c */ 2199void f2fs_free_encryption_info(struct inode *, struct f2fs_crypt_info *); 2200int _f2fs_get_encryption_info(struct inode *inode); 2201 2202/* crypto_fname.c */ 2203bool f2fs_valid_filenames_enc_mode(uint32_t); 2204u32 f2fs_fname_crypto_round_up(u32, u32); | 2222void f2fs_end_io_crypto_work(struct f2fs_crypto_ctx *, struct bio *); 2223 2224/* crypto_key.c */ 2225void f2fs_free_encryption_info(struct inode *, struct f2fs_crypt_info *); 2226int _f2fs_get_encryption_info(struct inode *inode); 2227 2228/* crypto_fname.c */ 2229bool f2fs_valid_filenames_enc_mode(uint32_t); 2230u32 f2fs_fname_crypto_round_up(u32, u32); |
2231unsigned f2fs_fname_encrypted_size(struct inode *, u32); |
|
2205int f2fs_fname_crypto_alloc_buffer(struct inode *, u32, struct f2fs_str *); 2206int f2fs_fname_disk_to_usr(struct inode *, f2fs_hash_t *, 2207 const struct f2fs_str *, struct f2fs_str *); 2208int f2fs_fname_usr_to_disk(struct inode *, const struct qstr *, 2209 struct f2fs_str *); 2210 2211#ifdef CONFIG_F2FS_FS_ENCRYPTION 2212void f2fs_restore_and_release_control_page(struct page **); --- 50 unchanged lines hidden --- | 2232int f2fs_fname_crypto_alloc_buffer(struct inode *, u32, struct f2fs_str *); 2233int f2fs_fname_disk_to_usr(struct inode *, f2fs_hash_t *, 2234 const struct f2fs_str *, struct f2fs_str *); 2235int f2fs_fname_usr_to_disk(struct inode *, const struct qstr *, 2236 struct f2fs_str *); 2237 2238#ifdef CONFIG_F2FS_FS_ENCRYPTION 2239void f2fs_restore_and_release_control_page(struct page **); --- 50 unchanged lines hidden --- |