Revert "Revert "ext4: make mb_optimize_scan performance mount option work with extents""
authorDom Cobley <popcornmix@gmail.com>
Sat, 12 Nov 2022 11:43:15 +0000 (11:43 +0000)
committerDom Cobley <popcornmix@gmail.com>
Sat, 12 Nov 2022 11:49:10 +0000 (11:49 +0000)
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 <popcornmix@gmail.com>
fs/ext4/mballoc.c

index 094bda1..0c7498a 100644 (file)
@@ -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;
 }