f2fs: add new interfaces for extent tree
authorFan Li <fanofcode.li@samsung.com>
Wed, 15 Jul 2015 10:05:17 +0000 (18:05 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 5 Aug 2015 15:08:08 +0000 (08:08 -0700)
commit0f825ee6e873ac0daf5394c5ec76ca2f3d540370
treefa2380aea19fb799dd9f31810d019a4badd24f4a
parent86531d6b84bc096d5d9dbc23333df0ab8d347763
f2fs: add new interfaces for extent tree

Add a lookup and a insertion interface for extent tree.
The new lookup return the insert position and the prev/next
extents closest to the offset we lookup when find no match.
The new insertion uses above parameters to improve performance.

There are three possible insertions after the lookup in
f2fs_update_extent_tree, two of them insert parts of removed extent
back to tree, since no merge happens during this process, new insertion
skips the merge check in this scanario; the another insertion inserts a
new extent to tree, new insertion uses prev/next extent and insert
position to insert this extent directly, and save the time of searching
down the tree.

As long as tree remains unchanged between lookup and insertion, this
would work fine. And the new lookup would be useful when add
multi-blocks extent support for insertion interface.

Signed-off-by: Fan li <fanofcode.li@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/extent_cache.c
This page took 0.025303 seconds and 5 git commands to generate.