diff options
| author | Zhang Yi <yi.zhang@huawei.com> | 2026-10-09 18:30:08 +0800 |
|---|---|---|
| committer | Theodore Ts'o <tytso@mit.edu> | 2026-10-15 10:53:12 -0400 |
| commit | 7f373083b45757b19f36a939f255239d40ccfb24 (patch) | |
| tree | d446adbf86e2b5ef438ea564ae262b58f04875da /scripts/Makefile.thinlto | |
| parent | 6585cea3cf58b8e8bbfb2a7befecb7ceeb0792ef (diff) | |
| download | linux-7f373083b45757b19f36a939f255239d40ccfb24.tar.gz linux-7f373083b45757b19f36a939f255239d40ccfb24.zip | |
ext4: avoid unnecessary transaction in ext4_map_blocks() for unwritten extents
When ext4_map_blocks() finds an unwritten extent in the extent cache and
the caller is willing to accept unwritten extents without conversion,
there is no need to start a journal transaction since no metadata update
is required. This avoids unnecessary transaction overhead in the
upcoming iomap writeback path when overwriting already-allocated
unwritten extents.
One thing to be careful about, as the comment in ext4_map_blocks()
states, if the flags contain EXT4_GET_BLOCKS_CREATE, the function will
mark @map as mapped.
Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Tested-by: syzbot@syzkaller.appspotmail.com
Link: https://patch.msgid.link/20261009103033.2920530-8-yi.zhang@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
