Skip to content

Commit 6f560c0

Browse files
chaseyuJaegeuk Kim
authored andcommitted
f2fs: let f2fs_precache_extents() traverses in file range
Rather than in range of [0, max_file_blocks()), since data after EOF is alwasy zero, it's unnecessary to preload mapping info of the data. Signed-off-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent e0d4e8a commit 6f560c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/f2fs/file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3263,7 +3263,7 @@ int f2fs_precache_extents(struct inode *inode)
32633263
map.m_next_extent = &m_next_extent;
32643264
map.m_seg_type = NO_CHECK_TYPE;
32653265
map.m_may_create = false;
3266-
end = max_file_blocks(inode);
3266+
end = F2FS_BLK_ALIGN(i_size_read(inode));
32673267

32683268
while (map.m_lblk < end) {
32693269
map.m_len = end - map.m_lblk;

0 commit comments

Comments
 (0)