]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: return hole from ext4_map_blocks()
authorJan Kara <jack@suse.cz>
Thu, 10 Mar 2016 03:54:00 +0000 (22:54 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 10 Mar 2016 03:54:00 +0000 (22:54 -0500)
commit52252a0ec7ff61466403e717258e31a0d94a416a
tree5c0f800db5aeb1fca6842c81cd3821ae847fcc0d
parente769a4bc418480f505e0a200eaf3e9ecbc84ef0c
ext4: return hole from ext4_map_blocks()

Currently, ext4_map_blocks() just returns 0 when it finds a hole and
allocation is not requested. However we have all the information
available to tell how large the hole actually is and there are callers
of ext4_map_blocks() which would save some block-by-block hole iteration
if they knew this information. So fill in struct ext4_map_blocks even
for holes with the information we have. We keep returning 0 for holes to
maintain backward compatibility of the function.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/extents.c
fs/ext4/indirect.c
fs/ext4/inode.c