diff options
author | Kemeng Shi <shikemeng@huaweicloud.com> | 2024-04-24 14:19:02 +0800 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2024-05-03 00:12:32 -0400 |
commit | d1a3924e43a35860ed7edaeec7f901a1ade2ac37 (patch) | |
tree | 27f434730d4580ec9c6ae527b9166d03d3fd8de0 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | d0b88624f81f272626c767f4b715f4b690fcbed2 (diff) |
ext4: call ext4_mb_mark_free_simple to free continuous bits in found chunk
In mb_mark_used, we will find free chunk and mark it inuse. For chunk
in mid of passed range, we could simply mark whole chunk inuse. For chunk
at end of range, we may need to mark a continuous bits at end of part of
chunk inuse and keep rest part of chunk free. To only mark a part of
chunk inuse, we firstly mark whole chunk inuse and then mark a continuous
range at end of chunk free.
Function mb_mark_used does several times of "mb_find_buddy; mb_clear_bit;
..." to mark a continuous range free which can be done by simply calling
ext4_mb_mark_free_simple which free continuous bits in a more effective
way.
Just call ext4_mb_mark_free_simple in mb_mark_used to use existing and
effective code to free continuous blocks in chunk at end of passed range.
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20240424061904.987525-4-shikemeng@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions