]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ext4: pass allocate range as loff_t to ext4_alloc_file_blocks()
authorZhang Yi <yi.zhang@huawei.com>
Fri, 27 Mar 2026 10:29:33 +0000 (18:29 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 10 Apr 2026 01:57:52 +0000 (21:57 -0400)
commitad1876bc4c4cae59f747b4225007cdc31f834597
tree0a3a7a938481706e1a4d157ee55a4cfe9e7bbb44
parentd3609a71b777d073ea6ead2e6eed93e97841fa21
ext4: pass allocate range as loff_t to ext4_alloc_file_blocks()

Change ext4_alloc_file_blocks() to accept offset and len in byte
granularity instead of block granularity. This allows callers to pass
byte offsets and lengths directly, and this prepares for moving the
ext4_zero_partial_blocks() call from the while(len) loop for unaligned
append writes, where it only needs to be invoked once before doing block
allocation.

Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20260327102939.1095257-8-yi.zhang@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/extents.c