From 46937443a928d407705747a54f6533b013ddbc4d Mon Sep 17 00:00:00 2001 From: Dom Cobley Date: Sat, 12 Nov 2022 11:43:15 +0000 Subject: [PATCH] Revert "Revert "ext4: make mb_optimize_scan performance mount option work with extents"" This reverts commit e05a335a16e0fc8d030962d3c6a75446f6b42f1c. The revert should no longer be necessary after upstream: ext4: avoid unnecessary spreading of allocations among groups See: https://github.com/raspberrypi/linux/issues/5097 Signed-off-by: Dom Cobley --- fs/ext4/mballoc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 094bda1..0c7498a 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -1000,7 +1000,7 @@ static inline int should_optimize_scan(struct ext4_allocation_context *ac) return 0; if (ac->ac_criteria >= 2) return 0; - if (ext4_test_inode_flag(ac->ac_inode, EXT4_INODE_EXTENTS)) + if (!ext4_test_inode_flag(ac->ac_inode, EXT4_INODE_EXTENTS)) return 0; return 1; } -- 2.7.4