]> git.ipfire.org Git - thirdparty/linux.git/commit
ext4: replace ext4_es_insert_extent() when caching on-disk extents
authorZhang Yi <yi.zhang@huawei.com>
Sat, 29 Nov 2025 10:32:45 +0000 (18:32 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 18 Jan 2026 16:23:34 +0000 (11:23 -0500)
commita5567347b6f5e888c56274d710b8f9525dbd57d0
tree94422b21681a9bc31c375f134bd41add6286da83
parentb32e61cf6470ced0a70f20c9b513511a4e79b390
ext4: replace ext4_es_insert_extent() when caching on-disk extents

In ext4, the remaining places for inserting extents into the extent
status tree within ext4_ext_determine_insert_hole() and
ext4_map_query_blocks() directly cache on-disk extents. We can use
ext4_es_cache_extent() instead of ext4_es_insert_extent() in these
cases. This will help reduce unnecessary increases in extent sequence
numbers and cache invalidations after supporting IOMAP in the future.

Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Baokun Li <libaokun1@huawei.com>
Message-ID: <20251129103247.686136-14-yi.zhang@huaweicloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/extents.c
fs/ext4/inode.c