Last active
June 22, 2022 09:20
-
-
Save YellowOnion/e635710deecb700d375c4cf07c5efbd4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/fs/bcachefs/buckets.h b/fs/bcachefs/buckets.h | |
index 670b95b82442..6881502d95f1 100644 | |
--- a/fs/bcachefs/buckets.h | |
+++ b/fs/bcachefs/buckets.h | |
@@ -178,12 +178,12 @@ static inline u64 __dev_buckets_available(struct bch_dev *ca, | |
enum alloc_reserve reserve) | |
{ | |
return max_t(s64, 0, | |
- usage.d[BCH_DATA_free].buckets - | |
- usage.d[BCH_DATA_cached].buckets - | |
- usage.d[BCH_DATA_need_gc_gens].buckets - | |
- usage.d[BCH_DATA_need_discard].buckets - | |
- ca->nr_open_buckets - | |
- bch2_dev_buckets_reserved(ca, reserve)); | |
+ usage.d[BCH_DATA_free].buckets | |
+ + usage.d[BCH_DATA_cached].buckets | |
+ + usage.d[BCH_DATA_need_gc_gens].buckets | |
+ + usage.d[BCH_DATA_need_discard].buckets | |
+ - ca->nr_open_buckets | |
+ - bch2_dev_buckets_reserved(ca, reserve)); | |
} | |
static inline u64 dev_buckets_available(struct bch_dev *ca, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment