]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: fix fast commit may miss tracking range for FALLOC_FL_ZERO_RANGE
authorXin Yin <yinxin.x@bytedance.com>
Tue, 21 Dec 2021 02:28:39 +0000 (10:28 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 10 Jan 2022 18:25:44 +0000 (13:25 -0500)
commit58e5f58cdd5d90e38920b2aad7caa7566ee2ffd0
tree540e5c5dbdf551d1dece0a8e2ac6d3893866817d
parentfc28d1d889484fcd53a3dddbb43e3710d7ed6360
ext4: fix fast commit may miss tracking range for FALLOC_FL_ZERO_RANGE

when call falloc with FALLOC_FL_ZERO_RANGE, to set an range to unwritten,
which has been already initialized. If the range is align to blocksize,
fast commit will not track range for this change.

Also track range for unwritten range in ext4_map_blocks().

Signed-off-by: Xin Yin <yinxin.x@bytedance.com>
Reviewed-by: Harshad Shirwadkar <harshadshirwadkar@gmail.com>
Link: https://lore.kernel.org/r/20211221022839.374606-1-yinxin.x@bytedance.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
fs/ext4/extents.c
fs/ext4/inode.c