From: Kent Overstreet Date: Tue, 21 Aug 2018 19:19:33 +0000 (-0400) Subject: bcachefs: Prioritize fragmentation in bucket allocator X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f84306a5700fba38050ad14ab46ed86aea321aba;p=linux.git bcachefs: Prioritize fragmentation in bucket allocator Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/alloc.c b/fs/bcachefs/alloc.c index 82f27a57dc610..73c11f808edcd 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,