ext4: make ext4_es_insert_delayed_block() insert multi-blocks
authorZhang Yi <yi.zhang@huawei.com>
Fri, 17 May 2024 12:40:01 +0000 (20:40 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 27 Jun 2024 22:04:49 +0000 (18:04 -0400)
commit12eba993b94c9186e44a01f46e38b3ab3c635f2d
treeb64945a89abed6d69cdec53778887156520551f4
parentbb6b18057f18e9b7f53a524721060652de151e8a
ext4: make ext4_es_insert_delayed_block() insert multi-blocks

Rename ext4_es_insert_delayed_block() to ext4_es_insert_delayed_extent()
and pass length parameter to make it insert multiple delalloc blocks at
a time. For the case of bigalloc, split the allocated parameter to
lclu_allocated and end_allocated. lclu_allocated indicates the
allocation state of the cluster which is containing the lblk,
end_allocated indicates the allocation state of the extent end, clusters
in the middle of delay allocated extent must be unallocated.

Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20240517124005.347221-7-yi.zhang@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/extents_status.c
fs/ext4/extents_status.h
fs/ext4/inode.c
include/trace/events/ext4.h