summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2018-08-21 15:19:33 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2018-08-21 15:19:33 -0400
commit23414ce6b8db648bd68de09ce0b7516d709a3582 (patch)
treef8cb2357240020d045b85b1327caaf2474411d6e
parentd9bf5460deb77a8af28c538534a8a895b2d0b5cf (diff)
bcachefs: Prioritize fragmentation in bucket allocator
-rw-r--r--fs/bcachefs/alloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/alloc.c b/fs/bcachefs/alloc.c
index 3f43a1be3a12..d303ecee80d8 100644
--- a/fs/bcachefs/alloc.c
+++ b/fs/bcachefs/alloc.c
@@ -610,7 +610,7 @@ static unsigned long bucket_sort_key(struct bch_fs *c, struct bch_dev *ca,
return (data_wantness << 9) |
(needs_journal_commit << 8) |
- bucket_gc_gen(ca, b);
+ (bucket_gc_gen(ca, b) / 16);
}
static inline int bucket_alloc_cmp(alloc_heap *h,