summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/extents.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-05-10 14:14:06 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2025-05-21 20:14:54 -0400
commit284251557562f6e8f0ce439cb52a6b9645b4e9a4 (patch)
tree9a8e06cb12ea26bdb0572f33d5cee2224b231fc6 /fs/bcachefs/extents.c
parentbcachefs: Slim down inlined part of bch2_btree_path_upgrade() (diff)
downloadlinux-284251557562f6e8f0ce439cb52a6b9645b4e9a4.tar.gz
linux-284251557562f6e8f0ce439cb52a6b9645b4e9a4.zip
bcachefs: Debug params are now static_keys
We'd like users to be able to debug without building custom kernels, so this will help us get rid of CONFIG_BCACHEFS_DEBUG, at least for most things. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/extents.c')
-rw-r--r--fs/bcachefs/extents.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/extents.c b/fs/bcachefs/extents.c
index d3af841e48ef..1ac9897f189d 100644
--- a/fs/bcachefs/extents.c
+++ b/fs/bcachefs/extents.c
@@ -164,7 +164,7 @@ static inline bool ptr_better(struct bch_fs *c,
if (unlikely(failed_delta))
return failed_delta < 0;
- if (unlikely(bch2_force_reconstruct_read))
+ if (static_branch_unlikely(&bch2_force_reconstruct_read))
return p1.do_ec_reconstruct > p2.do_ec_reconstruct;
if (unlikely(p1.do_ec_reconstruct || p2.do_ec_reconstruct))
@@ -259,7 +259,7 @@ int bch2_bkey_pick_read_device(struct bch_fs *c, struct bkey_s_c k,
p.do_ec_reconstruct = true;
}
- if (bch2_force_reconstruct_read && p.has_ec)
+ if (static_branch_unlikely(&bch2_force_reconstruct_read) && p.has_ec)
p.do_ec_reconstruct = true;
u64 p_latency = dev_latency(ca);