diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-01-03 10:01:48 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:03:58 -0400 |
commit | 98ed51747b63435b9987ef12692a75c223818bbe (patch) | |
tree | f7f983d4754b267d8c7ed279a68e2d0ca970784c /fs/btrfs/extent-tree.c | |
parent | f9ef6604ace23a6fcd698e08b58a883d6009157b (diff) |
Btrfs: Force inlining off in a few places to save stack usage
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 66 |
1 files changed, 37 insertions, 29 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 54f2b1d8bdfd..4957cface9ab 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -162,10 +162,11 @@ struct btrfs_block_group_cache *btrfs_lookup_block_group(struct | |||
162 | return block_group; | 162 | return block_group; |
163 | return NULL; | 163 | return NULL; |
164 | } | 164 | } |
165 | static u64 find_search_start(struct btrfs_root *root, | 165 | |
166 | struct btrfs_block_group_cache **cache_ret, | 166 | static u64 noinline find_search_start(struct btrfs_root *root, |
167 | u64 search_start, int num, | 167 | struct btrfs_block_group_cache **cache_ret, |
168 | int data, int full_scan) | 168 | u64 search_start, int num, |
169 | int data, int full_scan) | ||
169 | { | 170 | { |
170 | int ret; | 171 | int ret; |
171 | struct btrfs_block_group_cache *cache = *cache_ret; | 172 | struct btrfs_block_group_cache *cache = *cache_ret; |
@@ -393,11 +394,12 @@ static int match_extent_ref(struct extent_buffer *leaf, | |||
393 | return ret == 0; | 394 | return ret == 0; |
394 | } | 395 | } |
395 | 396 | ||
396 | static int lookup_extent_backref(struct btrfs_trans_handle *trans, | 397 | static int noinline lookup_extent_backref(struct btrfs_trans_handle *trans, |
397 | struct btrfs_root *root, | 398 | struct btrfs_root *root, |
398 | struct btrfs_path *path, u64 bytenr, | 399 | struct btrfs_path *path, u64 bytenr, |
399 | u64 root_objectid, u64 ref_generation, | 400 | u64 root_objectid, |
400 | u64 owner, u64 owner_offset, int del) | 401 | u64 ref_generation, u64 owner, |
402 | u64 owner_offset, int del) | ||
401 | { | 403 | { |
402 | u64 hash; | 404 | u64 hash; |
403 | struct btrfs_key key; | 405 | struct btrfs_key key; |
@@ -1116,8 +1118,8 @@ int btrfs_finish_extent_commit(struct btrfs_trans_handle *trans, | |||
1116 | return 0; | 1118 | return 0; |
1117 | } | 1119 | } |
1118 | 1120 | ||
1119 | static int finish_current_insert(struct btrfs_trans_handle *trans, struct | 1121 | static int finish_current_insert(struct btrfs_trans_handle *trans, |
1120 | btrfs_root *extent_root) | 1122 | struct btrfs_root *extent_root) |
1121 | { | 1123 | { |
1122 | u64 start; | 1124 | u64 start; |
1123 | u64 end; | 1125 | u64 end; |
@@ -1360,11 +1362,13 @@ static u64 stripe_align(struct btrfs_root *root, u64 val) | |||
1360 | * ins->offset == number of blocks | 1362 | * ins->offset == number of blocks |
1361 | * Any available blocks before search_start are skipped. | 1363 | * Any available blocks before search_start are skipped. |
1362 | */ | 1364 | */ |
1363 | static int find_free_extent(struct btrfs_trans_handle *trans, struct btrfs_root | 1365 | static int noinline find_free_extent(struct btrfs_trans_handle *trans, |
1364 | *orig_root, u64 num_bytes, u64 empty_size, | 1366 | struct btrfs_root *orig_root, |
1365 | u64 search_start, u64 search_end, u64 hint_byte, | 1367 | u64 num_bytes, u64 empty_size, |
1366 | struct btrfs_key *ins, u64 exclude_start, | 1368 | u64 search_start, u64 search_end, |
1367 | u64 exclude_nr, int data) | 1369 | u64 hint_byte, struct btrfs_key *ins, |
1370 | u64 exclude_start, u64 exclude_nr, | ||
1371 | int data) | ||
1368 | { | 1372 | { |
1369 | struct btrfs_path *path; | 1373 | struct btrfs_path *path; |
1370 | struct btrfs_key key; | 1374 | struct btrfs_key key; |
@@ -1760,8 +1764,9 @@ struct extent_buffer *__btrfs_alloc_free_block(struct btrfs_trans_handle *trans, | |||
1760 | return buf; | 1764 | return buf; |
1761 | } | 1765 | } |
1762 | 1766 | ||
1763 | static int drop_leaf_ref(struct btrfs_trans_handle *trans, | 1767 | static int noinline drop_leaf_ref(struct btrfs_trans_handle *trans, |
1764 | struct btrfs_root *root, struct extent_buffer *leaf) | 1768 | struct btrfs_root *root, |
1769 | struct extent_buffer *leaf) | ||
1765 | { | 1770 | { |
1766 | u64 leaf_owner; | 1771 | u64 leaf_owner; |
1767 | u64 leaf_generation; | 1772 | u64 leaf_generation; |
@@ -1802,8 +1807,8 @@ static int drop_leaf_ref(struct btrfs_trans_handle *trans, | |||
1802 | return 0; | 1807 | return 0; |
1803 | } | 1808 | } |
1804 | 1809 | ||
1805 | static void reada_walk_down(struct btrfs_root *root, | 1810 | static void noinline reada_walk_down(struct btrfs_root *root, |
1806 | struct extent_buffer *node) | 1811 | struct extent_buffer *node) |
1807 | { | 1812 | { |
1808 | int i; | 1813 | int i; |
1809 | u32 nritems; | 1814 | u32 nritems; |
@@ -1835,8 +1840,9 @@ static void reada_walk_down(struct btrfs_root *root, | |||
1835 | * helper function for drop_snapshot, this walks down the tree dropping ref | 1840 | * helper function for drop_snapshot, this walks down the tree dropping ref |
1836 | * counts as it goes. | 1841 | * counts as it goes. |
1837 | */ | 1842 | */ |
1838 | static int walk_down_tree(struct btrfs_trans_handle *trans, struct btrfs_root | 1843 | static int noinline walk_down_tree(struct btrfs_trans_handle *trans, |
1839 | *root, struct btrfs_path *path, int *level) | 1844 | struct btrfs_root *root, |
1845 | struct btrfs_path *path, int *level) | ||
1840 | { | 1846 | { |
1841 | u64 root_owner; | 1847 | u64 root_owner; |
1842 | u64 root_gen; | 1848 | u64 root_gen; |
@@ -1955,8 +1961,9 @@ out: | |||
1955 | * to find the first node higher up where we haven't yet gone through | 1961 | * to find the first node higher up where we haven't yet gone through |
1956 | * all the slots | 1962 | * all the slots |
1957 | */ | 1963 | */ |
1958 | static int walk_up_tree(struct btrfs_trans_handle *trans, struct btrfs_root | 1964 | static int noinline walk_up_tree(struct btrfs_trans_handle *trans, |
1959 | *root, struct btrfs_path *path, int *level) | 1965 | struct btrfs_root *root, |
1966 | struct btrfs_path *path, int *level) | ||
1960 | { | 1967 | { |
1961 | u64 root_owner; | 1968 | u64 root_owner; |
1962 | u64 root_gen; | 1969 | u64 root_gen; |
@@ -2100,7 +2107,8 @@ int btrfs_free_block_groups(struct btrfs_fs_info *info) | |||
2100 | return 0; | 2107 | return 0; |
2101 | } | 2108 | } |
2102 | 2109 | ||
2103 | static int relocate_inode_pages(struct inode *inode, u64 start, u64 len) | 2110 | static int noinline relocate_inode_pages(struct inode *inode, u64 start, |
2111 | u64 len) | ||
2104 | { | 2112 | { |
2105 | u64 page_start; | 2113 | u64 page_start; |
2106 | u64 page_end; | 2114 | u64 page_end; |
@@ -2169,7 +2177,7 @@ out_unlock: | |||
2169 | /* | 2177 | /* |
2170 | * note, this releases the path | 2178 | * note, this releases the path |
2171 | */ | 2179 | */ |
2172 | static int relocate_one_reference(struct btrfs_root *extent_root, | 2180 | static int noinline relocate_one_reference(struct btrfs_root *extent_root, |
2173 | struct btrfs_path *path, | 2181 | struct btrfs_path *path, |
2174 | struct btrfs_key *extent_key) | 2182 | struct btrfs_key *extent_key) |
2175 | { | 2183 | { |
@@ -2268,9 +2276,9 @@ out: | |||
2268 | return 0; | 2276 | return 0; |
2269 | } | 2277 | } |
2270 | 2278 | ||
2271 | static int relocate_one_extent(struct btrfs_root *extent_root, | 2279 | static int noinline relocate_one_extent(struct btrfs_root *extent_root, |
2272 | struct btrfs_path *path, | 2280 | struct btrfs_path *path, |
2273 | struct btrfs_key *extent_key) | 2281 | struct btrfs_key *extent_key) |
2274 | { | 2282 | { |
2275 | struct btrfs_key key; | 2283 | struct btrfs_key key; |
2276 | struct btrfs_key found_key; | 2284 | struct btrfs_key found_key; |