]> git.karo-electronics.de Git - linux-beck.git/commit
f2fs: introduce get_next_page_offset to speed up SEEK_DATA
authorChao Yu <chao2.yu@samsung.com>
Tue, 26 Jan 2016 07:40:44 +0000 (15:40 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 23 Feb 2016 00:07:23 +0000 (16:07 -0800)
commit3cf4574705b4e1a1a0aeaae0332e8c2c8b56cc8f
tree1080b5e5735ded164cf46b4d1e73d44b26528de2
parent81ca7350ce5ed438547ea769b0c33cb0abbd74ba
f2fs: introduce get_next_page_offset to speed up SEEK_DATA

When seeking data in ->llseek, if we encounter a big hole which covers
several dnode pages, we will try to seek data from index of page which
is the first page of next dnode page, at most we could skip searching
(ADDRS_PER_BLOCK - 1) pages.

However it's still not efficient, because if our indirect/double-indirect
pointer are NULL, there are no dnode page locate in the tree indirect/
double-indirect pointer point to, it's not necessary to search the whole
region.

This patch introduces get_next_page_offset to calculate next page offset
based on current searching level and max searching level returned from
get_dnode_of_data, with this, we could skip searching the entire area
indirect or double-indirect node block is not exist.

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/f2fs.h
fs/f2fs/file.c
fs/f2fs/node.c