From f84306a5700fba38050ad14ab46ed86aea321aba Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Tue, 21 Aug 2018 15:19:33 -0400 Subject: [PATCH] bcachefs: Prioritize fragmentation in bucket allocator Signed-off-by: Kent Overstreet --- fs/bcachefs/alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/bcachefs/alloc.c b/fs/bcachefs/alloc.c index 82f27a57dc61..73c11f808edc 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,