]> www.infradead.org Git - users/willy/xarray.git/commit
ext4: make some fast commit functions reuse extents path
authorBaokun Li <libaokun1@huawei.com>
Thu, 22 Aug 2024 02:35:44 +0000 (10:35 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 4 Sep 2024 02:14:12 +0000 (22:14 -0400)
commit2352e3e461926b59f01c1e39fbb0494891cff997
treecdad97c679194540b5aace3776b498b305f12d02
parenta2c613b8c4860d5e70010e7391fff727c5d96bab
ext4: make some fast commit functions reuse extents path

The ext4_find_extent() can update the extent path so that it does not have
to allocate and free the path repeatedly, thus reducing the consumption of
memory allocation and freeing in the following functions:

    ext4_ext_clear_bb
    ext4_ext_replay_set_iblocks
    ext4_fc_replay_add_range
    ext4_fc_set_bitmaps_and_counters

No functional changes. Note that ext4_find_extent() does not support error
pointers, so in this case set path to NULL first.

Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Tested-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Link: https://patch.msgid.link/20240822023545.1994557-25-libaokun@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/extents.c
fs/ext4/fast_commit.c