aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/balloc.c2
-rw-r--r--fs/ext4/ext4.h8
-rw-r--r--fs/ext4/ext4_extents.h10
-rw-r--r--fs/ext4/extents.c36
-rw-r--r--fs/ext4/ialloc.c11
-rw-r--r--fs/ext4/inode.c2
-rw-r--r--fs/ext4/super.c2
7 files changed, 27 insertions, 44 deletions
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
index bd30799a43ed..a12cefc20c76 100644
--- a/fs/ext4/balloc.c
+++ b/fs/ext4/balloc.c
@@ -489,7 +489,7 @@ error_return:
489 * Check if filesystem has nblocks free & available for allocation. 489 * Check if filesystem has nblocks free & available for allocation.
490 * On success return 1, return 0 on failure. 490 * On success return 1, return 0 on failure.
491 */ 491 */
492int ext4_has_free_blocks(struct ext4_sb_info *sbi, s64 nblocks) 492static int ext4_has_free_blocks(struct ext4_sb_info *sbi, s64 nblocks)
493{ 493{
494 s64 free_blocks, dirty_blocks, root_blocks; 494 s64 free_blocks, dirty_blocks, root_blocks;
495 struct percpu_counter *fbc = &sbi->s_freeblocks_counter; 495 struct percpu_counter *fbc = &sbi->s_freeblocks_counter;
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 5d72c261d7e9..ac1afc148b36 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -1558,8 +1558,6 @@ ext4_group_first_block_no(struct super_block *sb, ext4_group_t group_no)
1558void ext4_get_group_no_and_offset(struct super_block *sb, ext4_fsblk_t blocknr, 1558void ext4_get_group_no_and_offset(struct super_block *sb, ext4_fsblk_t blocknr,
1559 ext4_group_t *blockgrpp, ext4_grpblk_t *offsetp); 1559 ext4_group_t *blockgrpp, ext4_grpblk_t *offsetp);
1560 1560
1561extern struct proc_dir_entry *ext4_proc_root;
1562
1563/* 1561/*
1564 * Timeout and state flag for lazy initialization inode thread. 1562 * Timeout and state flag for lazy initialization inode thread.
1565 */ 1563 */
@@ -1623,7 +1621,6 @@ extern unsigned long ext4_bg_num_gdb(struct super_block *sb,
1623extern ext4_fsblk_t ext4_new_meta_blocks(handle_t *handle, struct inode *inode, 1621extern ext4_fsblk_t ext4_new_meta_blocks(handle_t *handle, struct inode *inode,
1624 ext4_fsblk_t goal, unsigned long *count, int *errp); 1622 ext4_fsblk_t goal, unsigned long *count, int *errp);
1625extern int ext4_claim_free_blocks(struct ext4_sb_info *sbi, s64 nblocks); 1623extern int ext4_claim_free_blocks(struct ext4_sb_info *sbi, s64 nblocks);
1626extern int ext4_has_free_blocks(struct ext4_sb_info *sbi, s64 nblocks);
1627extern void ext4_add_groupblocks(handle_t *handle, struct super_block *sb, 1624extern void ext4_add_groupblocks(handle_t *handle, struct super_block *sb,
1628 ext4_fsblk_t block, unsigned long count); 1625 ext4_fsblk_t block, unsigned long count);
1629extern ext4_fsblk_t ext4_count_free_blocks(struct super_block *); 1626extern ext4_fsblk_t ext4_count_free_blocks(struct super_block *);
@@ -1667,10 +1664,6 @@ extern struct inode * ext4_orphan_get(struct super_block *, unsigned long);
1667extern unsigned long ext4_count_free_inodes(struct super_block *); 1664extern unsigned long ext4_count_free_inodes(struct super_block *);
1668extern unsigned long ext4_count_dirs(struct super_block *); 1665extern unsigned long ext4_count_dirs(struct super_block *);
1669extern void ext4_check_inodes_bitmap(struct super_block *); 1666extern void ext4_check_inodes_bitmap(struct super_block *);
1670extern unsigned ext4_init_inode_bitmap(struct super_block *sb,
1671 struct buffer_head *bh,
1672 ext4_group_t group,
1673 struct ext4_group_desc *desc);
1674extern void mark_bitmap_end(int start_bit, int end_bit, char *bitmap); 1667extern void mark_bitmap_end(int start_bit, int end_bit, char *bitmap);
1675extern int ext4_init_inode_table(struct super_block *sb, 1668extern int ext4_init_inode_table(struct super_block *sb,
1676 ext4_group_t group, int barrier); 1669 ext4_group_t group, int barrier);
@@ -1723,7 +1716,6 @@ extern void ext4_get_inode_flags(struct ext4_inode_info *);
1723extern int ext4_alloc_da_blocks(struct inode *inode); 1716extern int ext4_alloc_da_blocks(struct inode *inode);
1724extern void ext4_set_aops(struct inode *inode); 1717extern void ext4_set_aops(struct inode *inode);
1725extern int ext4_writepage_trans_blocks(struct inode *); 1718extern int ext4_writepage_trans_blocks(struct inode *);
1726extern int ext4_meta_trans_blocks(struct inode *, int nrblocks, int idxblocks);
1727extern int ext4_chunk_trans_blocks(struct inode *, int nrblocks); 1719extern int ext4_chunk_trans_blocks(struct inode *, int nrblocks);
1728extern int ext4_block_truncate_page(handle_t *handle, 1720extern int ext4_block_truncate_page(handle_t *handle,
1729 struct address_space *mapping, loff_t from); 1721 struct address_space *mapping, loff_t from);
diff --git a/fs/ext4/ext4_extents.h b/fs/ext4/ext4_extents.h
index bdb6ce7e2eb4..e427082e9ffc 100644
--- a/fs/ext4/ext4_extents.h
+++ b/fs/ext4/ext4_extents.h
@@ -237,19 +237,9 @@ extern int ext4_ext_calc_credits_for_single_extent(struct inode *inode,
237extern int ext4_can_extents_be_merged(struct inode *inode, 237extern int ext4_can_extents_be_merged(struct inode *inode,
238 struct ext4_extent *ex1, 238 struct ext4_extent *ex1,
239 struct ext4_extent *ex2); 239 struct ext4_extent *ex2);
240extern int ext4_ext_try_to_merge(struct inode *inode,
241 struct ext4_ext_path *path,
242 struct ext4_extent *);
243extern unsigned int ext4_ext_check_overlap(struct inode *, struct ext4_extent *, struct ext4_ext_path *);
244extern int ext4_ext_insert_extent(handle_t *, struct inode *, struct ext4_ext_path *, struct ext4_extent *, int); 240extern int ext4_ext_insert_extent(handle_t *, struct inode *, struct ext4_ext_path *, struct ext4_extent *, int);
245extern int ext4_ext_walk_space(struct inode *, ext4_lblk_t, ext4_lblk_t,
246 ext_prepare_callback, void *);
247extern struct ext4_ext_path *ext4_ext_find_extent(struct inode *, ext4_lblk_t, 241extern struct ext4_ext_path *ext4_ext_find_extent(struct inode *, ext4_lblk_t,
248 struct ext4_ext_path *); 242 struct ext4_ext_path *);
249extern int ext4_ext_search_left(struct inode *, struct ext4_ext_path *,
250 ext4_lblk_t *, ext4_fsblk_t *);
251extern int ext4_ext_search_right(struct inode *, struct ext4_ext_path *,
252 ext4_lblk_t *, ext4_fsblk_t *);
253extern void ext4_ext_drop_refs(struct ext4_ext_path *); 243extern void ext4_ext_drop_refs(struct ext4_ext_path *);
254extern int ext4_ext_check_inode(struct inode *inode); 244extern int ext4_ext_check_inode(struct inode *inode);
255#endif /* _EXT4_EXTENTS */ 245#endif /* _EXT4_EXTENTS */
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index a1e20c8c4e0c..bd95375314ab 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -739,9 +739,9 @@ err:
739 * insert new index [@logical;@ptr] into the block at @curp; 739 * insert new index [@logical;@ptr] into the block at @curp;
740 * check where to insert: before @curp or after @curp 740 * check where to insert: before @curp or after @curp
741 */ 741 */
742int ext4_ext_insert_index(handle_t *handle, struct inode *inode, 742static int ext4_ext_insert_index(handle_t *handle, struct inode *inode,
743 struct ext4_ext_path *curp, 743 struct ext4_ext_path *curp,
744 int logical, ext4_fsblk_t ptr) 744 int logical, ext4_fsblk_t ptr)
745{ 745{
746 struct ext4_extent_idx *ix; 746 struct ext4_extent_idx *ix;
747 int len, err; 747 int len, err;
@@ -1232,9 +1232,9 @@ out:
1232 * returns 0 at @phys 1232 * returns 0 at @phys
1233 * return value contains 0 (success) or error code 1233 * return value contains 0 (success) or error code
1234 */ 1234 */
1235int 1235static int ext4_ext_search_left(struct inode *inode,
1236ext4_ext_search_left(struct inode *inode, struct ext4_ext_path *path, 1236 struct ext4_ext_path *path,
1237 ext4_lblk_t *logical, ext4_fsblk_t *phys) 1237 ext4_lblk_t *logical, ext4_fsblk_t *phys)
1238{ 1238{
1239 struct ext4_extent_idx *ix; 1239 struct ext4_extent_idx *ix;
1240 struct ext4_extent *ex; 1240 struct ext4_extent *ex;
@@ -1297,9 +1297,9 @@ ext4_ext_search_left(struct inode *inode, struct ext4_ext_path *path,
1297 * returns 0 at @phys 1297 * returns 0 at @phys
1298 * return value contains 0 (success) or error code 1298 * return value contains 0 (success) or error code
1299 */ 1299 */
1300int 1300static int ext4_ext_search_right(struct inode *inode,
1301ext4_ext_search_right(struct inode *inode, struct ext4_ext_path *path, 1301 struct ext4_ext_path *path,
1302 ext4_lblk_t *logical, ext4_fsblk_t *phys) 1302 ext4_lblk_t *logical, ext4_fsblk_t *phys)
1303{ 1303{
1304 struct buffer_head *bh = NULL; 1304 struct buffer_head *bh = NULL;
1305 struct ext4_extent_header *eh; 1305 struct ext4_extent_header *eh;
@@ -1585,9 +1585,9 @@ ext4_can_extents_be_merged(struct inode *inode, struct ext4_extent *ex1,
1585 * Returns 0 if the extents (ex and ex+1) were _not_ merged and returns 1585 * Returns 0 if the extents (ex and ex+1) were _not_ merged and returns
1586 * 1 if they got merged. 1586 * 1 if they got merged.
1587 */ 1587 */
1588int ext4_ext_try_to_merge(struct inode *inode, 1588static int ext4_ext_try_to_merge(struct inode *inode,
1589 struct ext4_ext_path *path, 1589 struct ext4_ext_path *path,
1590 struct ext4_extent *ex) 1590 struct ext4_extent *ex)
1591{ 1591{
1592 struct ext4_extent_header *eh; 1592 struct ext4_extent_header *eh;
1593 unsigned int depth, len; 1593 unsigned int depth, len;
@@ -1632,9 +1632,9 @@ int ext4_ext_try_to_merge(struct inode *inode,
1632 * such that there will be no overlap, and then returns 1. 1632 * such that there will be no overlap, and then returns 1.
1633 * If there is no overlap found, it returns 0. 1633 * If there is no overlap found, it returns 0.
1634 */ 1634 */
1635unsigned int ext4_ext_check_overlap(struct inode *inode, 1635static unsigned int ext4_ext_check_overlap(struct inode *inode,
1636 struct ext4_extent *newext, 1636 struct ext4_extent *newext,
1637 struct ext4_ext_path *path) 1637 struct ext4_ext_path *path)
1638{ 1638{
1639 ext4_lblk_t b1, b2; 1639 ext4_lblk_t b1, b2;
1640 unsigned int depth, len1; 1640 unsigned int depth, len1;
@@ -1845,9 +1845,9 @@ cleanup:
1845 return err; 1845 return err;
1846} 1846}
1847 1847
1848int ext4_ext_walk_space(struct inode *inode, ext4_lblk_t block, 1848static int ext4_ext_walk_space(struct inode *inode, ext4_lblk_t block,
1849 ext4_lblk_t num, ext_prepare_callback func, 1849 ext4_lblk_t num, ext_prepare_callback func,
1850 void *cbdata) 1850 void *cbdata)
1851{ 1851{
1852 struct ext4_ext_path *path = NULL; 1852 struct ext4_ext_path *path = NULL;
1853 struct ext4_ext_cache cbex; 1853 struct ext4_ext_cache cbex;
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index 87d228aae6b0..9666e4c6efb4 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -65,9 +65,10 @@ void mark_bitmap_end(int start_bit, int end_bit, char *bitmap)
65} 65}
66 66
67/* Initializes an uninitialized inode bitmap */ 67/* Initializes an uninitialized inode bitmap */
68unsigned ext4_init_inode_bitmap(struct super_block *sb, struct buffer_head *bh, 68static unsigned ext4_init_inode_bitmap(struct super_block *sb,
69 ext4_group_t block_group, 69 struct buffer_head *bh,
70 struct ext4_group_desc *gdp) 70 ext4_group_t block_group,
71 struct ext4_group_desc *gdp)
71{ 72{
72 struct ext4_sb_info *sbi = EXT4_SB(sb); 73 struct ext4_sb_info *sbi = EXT4_SB(sb);
73 74
@@ -414,8 +415,8 @@ struct orlov_stats {
414 * for a particular block group or flex_bg. If flex_size is 1, then g 415 * for a particular block group or flex_bg. If flex_size is 1, then g
415 * is a block group number; otherwise it is flex_bg number. 416 * is a block group number; otherwise it is flex_bg number.
416 */ 417 */
417void get_orlov_stats(struct super_block *sb, ext4_group_t g, 418static void get_orlov_stats(struct super_block *sb, ext4_group_t g,
418 int flex_size, struct orlov_stats *stats) 419 int flex_size, struct orlov_stats *stats)
419{ 420{
420 struct ext4_group_desc *desc; 421 struct ext4_group_desc *desc;
421 struct flex_groups *flex_group = EXT4_SB(sb)->s_flex_groups; 422 struct flex_groups *flex_group = EXT4_SB(sb)->s_flex_groups;
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 45fc5bdb7d67..7a83c2793956 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -5543,7 +5543,7 @@ static int ext4_index_trans_blocks(struct inode *inode, int nrblocks, int chunk)
5543 * 5543 *
5544 * Also account for superblock, inode, quota and xattr blocks 5544 * Also account for superblock, inode, quota and xattr blocks
5545 */ 5545 */
5546int ext4_meta_trans_blocks(struct inode *inode, int nrblocks, int chunk) 5546static int ext4_meta_trans_blocks(struct inode *inode, int nrblocks, int chunk)
5547{ 5547{
5548 ext4_group_t groups, ngroups = ext4_get_groups_count(inode->i_sb); 5548 ext4_group_t groups, ngroups = ext4_get_groups_count(inode->i_sb);
5549 int gdpblocks; 5549 int gdpblocks;
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 94e60038e05d..158d1bca8769 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -53,7 +53,7 @@
53#define CREATE_TRACE_POINTS 53#define CREATE_TRACE_POINTS
54#include <trace/events/ext4.h> 54#include <trace/events/ext4.h>
55 55
56struct proc_dir_entry *ext4_proc_root; 56static struct proc_dir_entry *ext4_proc_root;
57static struct kset *ext4_kset; 57static struct kset *ext4_kset;
58struct ext4_lazy_init *ext4_li_info; 58struct ext4_lazy_init *ext4_li_info;
59struct mutex ext4_li_mtx; 59struct mutex ext4_li_mtx;