diff options
author | Lukas Czerner <lczerner@redhat.com> | 2015-04-03 00:09:13 -0400 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2015-11-15 12:51:54 -0500 |
commit | b9fca5cb9ab94112bebd1e5db862962df9dfcec2 (patch) | |
tree | 993879459828ec1cc551c75b041764f3e858e85c /fs/timerfd.c | |
parent | 0812542d8e5337822045c81695caff87ea4f5105 (diff) | |
download | lwn-b9fca5cb9ab94112bebd1e5db862962df9dfcec2.tar.gz lwn-b9fca5cb9ab94112bebd1e5db862962df9dfcec2.zip |
ext4: allocate entire range in zero range
[ Upstream commit 0f2af21aae11972fa924374ddcf52e88347cf5a8 ]
Currently there is a bug in zero range code which causes zero range
calls to only allocate block aligned portion of the range, while
ignoring the rest in some cases.
In some cases, namely if the end of the range is past i_size, we do
attempt to preallocate the last nonaligned block. However this might
cause kernel to BUG() in some carefully designed zero range requests
on setups where page size > block size.
Fix this problem by first preallocating the entire range, including
the nonaligned edges and converting the written extents to unwritten
in the next step. This approach will also give us the advantage of
having the range to be as linearly contiguous as possible.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'fs/timerfd.c')
0 files changed, 0 insertions, 0 deletions