diff options
author | Zhang Yi <yi.zhang@huawei.com> | 2024-05-17 14:40:01 +0200 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2024-06-28 00:04:49 +0200 |
commit | 12eba993b94c9186e44a01f46e38b3ab3c635f2d (patch) | |
tree | b64945a89abed6d69cdec53778887156520551f4 /fs/ext4/inode.c | |
parent | ext4: drop iblock parameter (diff) | |
download | linux-12eba993b94c9186e44a01f46e38b3ab3c635f2d.tar.xz linux-12eba993b94c9186e44a01f46e38b3ab3c635f2d.zip |
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>
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r-- | fs/ext4/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 20528a04903a..c55f1607b7d8 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -1702,7 +1702,7 @@ static int ext4_insert_delayed_block(struct inode *inode, ext4_lblk_t lblk) } } - ext4_es_insert_delayed_block(inode, lblk, allocated); + ext4_es_insert_delayed_extent(inode, lblk, 1, allocated, false); return 0; } |