summaryrefslogtreecommitdiff
path: root/libbcachefs/alloc_background.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-06-24 12:50:52 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-06-27 19:38:18 -0400
commitcfa816bf3f823a3bedfedd8e214ea929c5c755fe (patch)
tree561ac156481ffbd82cb9698b6994f6d028fc0b9a /libbcachefs/alloc_background.h
parent84cb7bffe5e80ef9036213bbfbaf358d478536be (diff)
Update bcachefs sources to 84f132d569 bcachefs: fsck: Break walk_inode() up into multiple functions
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'libbcachefs/alloc_background.h')
-rw-r--r--libbcachefs/alloc_background.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbcachefs/alloc_background.h b/libbcachefs/alloc_background.h
index 94b3c057..3c4d6d40 100644
--- a/libbcachefs/alloc_background.h
+++ b/libbcachefs/alloc_background.h
@@ -220,7 +220,7 @@ static inline u64 should_invalidate_buckets(struct bch_dev *ca,
u64 free = max_t(s64, 0,
u.d[BCH_DATA_free].buckets
+ u.d[BCH_DATA_need_discard].buckets
- - bch2_dev_buckets_reserved(ca, RESERVE_stripe));
+ - bch2_dev_buckets_reserved(ca, BCH_WATERMARK_stripe));
return clamp_t(s64, want_free - free, 0, u.d[BCH_DATA_cached].buckets);
}