summaryrefslogtreecommitdiff
path: root/libbcachefs/alloc_background.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-04-06 16:16:32 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2025-04-13 21:10:24 -0400
commit844721635c1c8e7e43fb546052a659bfc92ed99d (patch)
tree5007b56b87df050e6b5a05a3049826680705b0ed /libbcachefs/alloc_background.h
parentad3875d1d9907bab0430c45ffa3b2dd39107106b (diff)
Update bcachefs sources to 2f9361370129 bcachefs: Improve opts.degraded
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'libbcachefs/alloc_background.h')
-rw-r--r--libbcachefs/alloc_background.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/libbcachefs/alloc_background.h b/libbcachefs/alloc_background.h
index c556ccaf..34b3d6ac 100644
--- a/libbcachefs/alloc_background.h
+++ b/libbcachefs/alloc_background.h
@@ -321,11 +321,11 @@ static inline u64 should_invalidate_buckets(struct bch_dev *ca,
{
u64 want_free = ca->mi.nbuckets >> 7;
u64 free = max_t(s64, 0,
- u.d[BCH_DATA_free].buckets
- + u.d[BCH_DATA_need_discard].buckets
+ u.buckets[BCH_DATA_free]
+ + u.buckets[BCH_DATA_need_discard]
- bch2_dev_buckets_reserved(ca, BCH_WATERMARK_stripe));
- return clamp_t(s64, want_free - free, 0, u.d[BCH_DATA_cached].buckets);
+ return clamp_t(s64, want_free - free, 0, u.buckets[BCH_DATA_cached]);
}
void bch2_dev_do_invalidates(struct bch_dev *);