]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
f2fs: Optimize f2fs_truncate_data_blocks_range()
authorYi Sun <yi.sun@unisoc.com>
Wed, 15 Jan 2025 05:39:43 +0000 (13:39 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 16 Jan 2025 17:27:29 +0000 (17:27 +0000)
commit120ac1dc322f402544423582234f441d98ea4a6e
tree4da8a070080bf354405cd33dba168c0781cec794
parentc84c2424932d18cf3888adfe9bd16f95dc5d9fd4
f2fs: Optimize f2fs_truncate_data_blocks_range()

Function f2fs_invalidate_blocks() can process consecutive
blocks at a time, so f2fs_truncate_data_blocks_range() is
optimized to use the new functionality of
f2fs_invalidate_blocks().

Add two variables @blkstart and @blklen, @blkstart records
the first address of the consecutive blocks, and @blkstart
records the number of consecutive blocks.

Signed-off-by: Yi Sun <yi.sun@unisoc.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/file.c