Skip to content
/ linux Public

Commit f18f701

Browse files
jankaraSasha Levin
authored andcommitted
ext4: use optimized mballoc scanning regardless of inode format
commit 3574c32 upstream. Currently we don't used mballoc optimized scanning (using max free extent order and avg free extent order group lists) for inodes with indirect block based format. This is confusing for users and I don't see a good reason for that. Even with indirect block based inode format we can spend big amount of time searching for free blocks for large filesystems with fragmented free space. To add to the confusion before commit 077d0c2 ("ext4: make mb_optimize_scan performance mount option work with extents") optimized scanning was applied *only* to indirect block based inodes so that commit appears as a performance regression to some users. Just use optimized scanning whenever it is enabled by mount options. Reviewed-by: Baokun Li <libaokun1@huawei.com> Reviewed-by: Zhang Yi <yi.zhang@huawei.com> Signed-off-by: Jan Kara <jack@suse.cz> Cc: stable@kernel.org Link: https://patch.msgid.link/20260114182836.14120-4-jack@suse.cz Signed-off-by: Theodore Ts'o <tytso@mit.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 4a79fde commit f18f701

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

fs/ext4/mballoc.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,8 +1090,6 @@ static inline int should_optimize_scan(struct ext4_allocation_context *ac)
10901090
return 0;
10911091
if (ac->ac_criteria >= CR_GOAL_LEN_SLOW)
10921092
return 0;
1093-
if (!ext4_test_inode_flag(ac->ac_inode, EXT4_INODE_EXTENTS))
1094-
return 0;
10951093
return 1;
10961094
}
10971095

0 commit comments

Comments
 (0)