Commit 298ac24e authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: Reduce stack frame size of bch2_check_alloc_info()

Excessive inlining may (on some versions of gcc?) cause excessive stack
usage; this turns off some inlining in bch2_check_alloc_info.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 75da9764
...@@ -1030,7 +1030,8 @@ struct bkey_s_c bch2_get_key_or_real_bucket_hole(struct btree_iter *iter, struct ...@@ -1030,7 +1030,8 @@ struct bkey_s_c bch2_get_key_or_real_bucket_hole(struct btree_iter *iter, struct
return k; return k;
} }
static int bch2_check_alloc_key(struct btree_trans *trans, static noinline_for_stack
int bch2_check_alloc_key(struct btree_trans *trans,
struct bkey_s_c alloc_k, struct bkey_s_c alloc_k,
struct btree_iter *alloc_iter, struct btree_iter *alloc_iter,
struct btree_iter *discard_iter, struct btree_iter *discard_iter,
...@@ -1159,7 +1160,8 @@ static int bch2_check_alloc_key(struct btree_trans *trans, ...@@ -1159,7 +1160,8 @@ static int bch2_check_alloc_key(struct btree_trans *trans,
return ret; return ret;
} }
static int bch2_check_alloc_hole_freespace(struct btree_trans *trans, static noinline_for_stack
int bch2_check_alloc_hole_freespace(struct btree_trans *trans,
struct bpos start, struct bpos start,
struct bpos *end, struct bpos *end,
struct btree_iter *freespace_iter) struct btree_iter *freespace_iter)
...@@ -1214,7 +1216,8 @@ static int bch2_check_alloc_hole_freespace(struct btree_trans *trans, ...@@ -1214,7 +1216,8 @@ static int bch2_check_alloc_hole_freespace(struct btree_trans *trans,
return ret; return ret;
} }
static int bch2_check_alloc_hole_bucket_gens(struct btree_trans *trans, static noinline_for_stack
int bch2_check_alloc_hole_bucket_gens(struct btree_trans *trans,
struct bpos start, struct bpos start,
struct bpos *end, struct bpos *end,
struct btree_iter *bucket_gens_iter) struct btree_iter *bucket_gens_iter)
...@@ -1279,7 +1282,7 @@ static int bch2_check_alloc_hole_bucket_gens(struct btree_trans *trans, ...@@ -1279,7 +1282,7 @@ static int bch2_check_alloc_hole_bucket_gens(struct btree_trans *trans,
return ret; return ret;
} }
static int __bch2_check_discard_freespace_key(struct btree_trans *trans, static noinline_for_stack int __bch2_check_discard_freespace_key(struct btree_trans *trans,
struct btree_iter *iter) struct btree_iter *iter)
{ {
struct bch_fs *c = trans->c; struct bch_fs *c = trans->c;
...@@ -1359,7 +1362,8 @@ static int bch2_check_discard_freespace_key(struct btree_trans *trans, ...@@ -1359,7 +1362,8 @@ static int bch2_check_discard_freespace_key(struct btree_trans *trans,
* valid for buckets that exist; this just checks for keys for nonexistent * valid for buckets that exist; this just checks for keys for nonexistent
* buckets. * buckets.
*/ */
static int bch2_check_bucket_gens_key(struct btree_trans *trans, static noinline_for_stack
int bch2_check_bucket_gens_key(struct btree_trans *trans,
struct btree_iter *iter, struct btree_iter *iter,
struct bkey_s_c k) struct bkey_s_c k)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment